Built with Alectryon, running Coq+SerAPI v8.15.0+0.15.0. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
New coercion path [Bool.Is_true] : bool >-> Sortclassis ambiguous with existing
[is_true] : bool >-> Sortclass.
[ambiguous-paths,typechecker]
New coercion path [Is_true] : bool >-> Sortclassis ambiguous with existing
[is_true] : bool >-> Sortclass.
[ambiguous-paths,typechecker]
Require Import MatchingLogic.Utils.extralibrary. (* compare_nat *)From MatchingLogic Require Import
Pattern.Sectionsubst.Context {Σ : Signature}.(* There are two substitution operations over patterns, [bevar_subst] and [bsvar_subst]. *)(* substitute bound variable x for psi in phi *)Fixpointbevar_subst (phipsi : Pattern) (x : db_index) :=
match phi with
| patt_free_evar x' => patt_free_evar x'
| patt_free_svar x' => patt_free_svar x'
| patt_bound_evar n => match compare_nat n x with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end
| patt_bound_svar n => patt_bound_svar n
| patt_sym sigma => patt_sym sigma
| patt_app phi1 phi2 => patt_app (bevar_subst phi1 psi x)
(bevar_subst phi2 psi x)
| patt_bott => patt_bott
| patt_imp phi1 phi2 => patt_imp (bevar_subst phi1 psi x) (bevar_subst phi2 psi x)
| patt_exists phi' => patt_exists (bevar_subst phi' psi (S x))
| patt_mu phi' => patt_mu (bevar_subst phi' psi x)
end.Fixpointbsvar_subst (phipsi : Pattern) (x : db_index) :=
match phi with
| patt_free_evar x' => patt_free_evar x'
| patt_free_svar x' => patt_free_svar x'
| patt_bound_evar n => patt_bound_evar n
| patt_bound_svar n => match compare_nat n x with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end
| patt_sym sigma => patt_sym sigma
| patt_app phi1 phi2 => patt_app (bsvar_subst phi1 psi x)
(bsvar_subst phi2 psi x)
| patt_bott => patt_bott
| patt_imp phi1 phi2 => patt_imp (bsvar_subst phi1 psi x) (bsvar_subst phi2 psi x)
| patt_exists phi' => patt_exists (bsvar_subst phi' psi x)
| patt_mu phi' => patt_mu (bsvar_subst phi' psi (S x))
end.Fixpointbevar_occur (phi : Pattern) (x : db_index) : bool :=
match phi with
| patt_free_evar x' => false
| patt_free_svar x' => false
| patt_bound_evar n => if decide (n = x) isleft _ then true else false
| patt_bound_svar n => false
| patt_sym sigma => false
| patt_app phi1 phi2 => orb (bevar_occur phi1 x)
(bevar_occur phi2 x)
| patt_bott => false
| patt_imp phi1 phi2 => orb (bevar_occur phi1 x) (bevar_occur phi2 x)
| patt_exists phi' => bevar_occur phi' (S x)
| patt_mu phi' => bevar_occur phi' x
end.Fixpointbsvar_occur (phi : Pattern) (x : db_index) : bool :=
match phi with
| patt_free_evar x' => false
| patt_free_svar x' => false
| patt_bound_evar n => false
| patt_bound_svar n => if (decide (n = x)) isleft _ then true else false
| patt_sym sigma => false
| patt_app phi1 phi2 => orb (bsvar_occur phi1 x)
(bsvar_occur phi2 x)
| patt_bott => false
| patt_imp phi1 phi2 => orb (bsvar_occur phi1 x) (bsvar_occur phi2 x)
| patt_exists phi' => bsvar_occur phi' x
| patt_mu phi' => bsvar_occur phi' (S x)
end.(* substitute free element variable x for psi in phi *)Fixpointfree_evar_subst (phipsi : Pattern) (x : evar) :=
match phi with
| patt_free_evar x' => if decide (x = x') isleft _ then psi else patt_free_evar x'
| patt_free_svar X => patt_free_svar X
| patt_bound_evar x' => patt_bound_evar x'
| patt_bound_svar X => patt_bound_svar X
| patt_sym sigma => patt_sym sigma
| patt_app phi1 phi2 => patt_app (free_evar_subst phi1 psi x)
(free_evar_subst phi2 psi x)
| patt_bott => patt_bott
| patt_imp phi1 phi2 => patt_imp (free_evar_subst phi1 psi x) (free_evar_subst phi2 psi x)
| patt_exists phi' => patt_exists (free_evar_subst phi' psi x)
| patt_mu phi' => patt_mu (free_evar_subst phi' psi x)
end.(* substitute free set variable X for psi in phi *)Fixpointfree_svar_subst (phipsi : Pattern) (X : svar) : Pattern :=
match phi with
| patt_free_evar x => patt_free_evar x
| patt_free_svar X' => if decide (X = X') isleft _ then psi else patt_free_svar X'
| patt_bound_evar x => patt_bound_evar x
| patt_bound_svar X' => patt_bound_svar X'
| patt_sym sigma => patt_sym sigma
| patt_app phi1 phi2 => patt_app (free_svar_subst phi1 psi X)
(free_svar_subst phi2 psi X)
| patt_bott => patt_bott
| patt_imp phi1 phi2 => patt_imp (free_svar_subst phi1 psi X) (free_svar_subst phi2 psi X)
| patt_exists phi' => patt_exists (free_svar_subst phi' psi X)
| patt_mu phi' => patt_mu (free_svar_subst phi' psi X)
end.(* instantiate exists x. p or mu x. p with psi for p *)Definitioninstantiate (phipsi : Pattern) :=
match phi with
| patt_exists phi' => bevar_subst phi' psi 0
| patt_mu phi' => bsvar_subst phi' psi 0
| _ => phi
end.(* replace element variable x with de Bruijn index level *)Fixpointevar_quantify (x : evar) (level : db_index)
(p : Pattern) : Pattern :=
match p with
| patt_free_evar x' => if decide (x = x') isleft _ then patt_bound_evar level else patt_free_evar x'
| patt_free_svar x' => patt_free_svar x'
| patt_bound_evar x' => patt_bound_evar x'
| patt_bound_svar X => patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs => patt_app (evar_quantify x level ls) (evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs => patt_imp (evar_quantify x level ls) (evar_quantify x level rs)
| patt_exists p' => patt_exists (evar_quantify x (S level) p')
| patt_mu p' => patt_mu (evar_quantify x level p')
end.(* replace set variable X with de Bruijn index level *)Fixpointsvar_quantify (X : svar) (level : db_index)
(p : Pattern) : Pattern :=
match p with
| patt_free_evar x' => patt_free_evar x'
| patt_free_svar X' => if decide (X = X') isleft _ then patt_bound_svar level else patt_free_svar X'
| patt_bound_evar x' => patt_bound_evar x'
| patt_bound_svar X => patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs => patt_app (svar_quantify X level ls) (svar_quantify X level rs)
| patt_bott => patt_bott
| patt_imp ls rs => patt_imp (svar_quantify X level ls) (svar_quantify X level rs)
| patt_exists p' => patt_exists (svar_quantify X level p')
| patt_mu p' => patt_mu (svar_quantify X (S level) p')
end.Definitionexists_quantify (x : evar)
(p : Pattern) : Pattern :=
patt_exists (evar_quantify x 0 p).Definitionmu_quantify (X : svar)
(p : Pattern) : Pattern :=
patt_mu (svar_quantify X 0 p).(* replace de Bruijn index k with element variable n *)Definitionevar_open (k : db_index) (x : evar) (p : Pattern) : Pattern :=
bevar_subst p (patt_free_evar x) k.(* replace de Bruijn index k with set variable n *)Definitionsvar_open (k : db_index) (X : svar) (p : Pattern) : Pattern :=
bsvar_subst p (patt_free_svar X) k.
Σ: Signature k: db_index n, x: evar
evar_open k n (patt_free_evar x) = patt_free_evar x
Σ: Signature k: db_index n, x: evar
evar_open k n (patt_free_evar x) = patt_free_evar x
reflexivity.Qed.
Σ: Signature k: db_index n: evar X: svar
evar_open k n (patt_free_svar X) = patt_free_svar X
Σ: Signature k: db_index n: evar X: svar
evar_open k n (patt_free_svar X) = patt_free_svar X
reflexivity.Qed.
Σ: Signature k: db_index n: evar x: db_index
evar_open k n (patt_bound_evar x) =
match compare_nat x k with
| Nat_less _ _ _ => patt_bound_evar x
| Nat_equal _ _ _ => patt_free_evar n
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred x)
end
Σ: Signature k: db_index n: evar x: db_index
evar_open k n (patt_bound_evar x) =
match compare_nat x k with
| Nat_less _ _ _ => patt_bound_evar x
| Nat_equal _ _ _ => patt_free_evar n
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred x)
end
Σ: Signature k: db_index n: evar x: db_index
match compare_nat x k with
| Nat_less _ _ _ => patt_bound_evar x
| Nat_equal _ _ _ => patt_free_evar n
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred x)
end =
match compare_nat x k with
| Nat_less _ _ _ => patt_bound_evar x
| Nat_equal _ _ _ => patt_free_evar n
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred x)
end
case_match; done.Qed.
Σ: Signature k: db_index n: evar X: db_index
evar_open k n (patt_bound_svar X) = patt_bound_svar X
Σ: Signature k: db_index n: evar X: db_index
evar_open k n (patt_bound_svar X) = patt_bound_svar X
reflexivity.Qed.
Σ: Signature k: db_index n: evar s: symbols
evar_open k n (patt_sym s) = patt_sym s
Σ: Signature k: db_index n: evar s: symbols
evar_open k n (patt_sym s) = patt_sym s
reflexivity.Qed.
Σ: Signature k: db_index n: evar ls, rs: Pattern
evar_open k n (patt_app ls rs) =
patt_app (evar_open k n ls) (evar_open k n rs)
Σ: Signature k: db_index n: evar ls, rs: Pattern
evar_open k n (patt_app ls rs) =
patt_app (evar_open k n ls) (evar_open k n rs)
reflexivity.Qed.
Σ: Signature k: db_index n: evar
evar_open k n patt_bott = patt_bott
Σ: Signature k: db_index n: evar
evar_open k n patt_bott = patt_bott
reflexivity.Qed.
Σ: Signature k: db_index n: evar ls, rs: Pattern
evar_open k n (patt_imp ls rs) =
patt_imp (evar_open k n ls) (evar_open k n rs)
Σ: Signature k: db_index n: evar ls, rs: Pattern
evar_open k n (patt_imp ls rs) =
patt_imp (evar_open k n ls) (evar_open k n rs)
reflexivity.Qed.
Σ: Signature k: db_index n: evar p': Pattern
evar_open k n (patt_exists p') =
patt_exists (evar_open (S k) n p')
Σ: Signature k: db_index n: evar p': Pattern
evar_open k n (patt_exists p') =
patt_exists (evar_open (S k) n p')
reflexivity.Qed.
Σ: Signature k: db_index n: evar p': Pattern
evar_open k n (patt_mu p') =
patt_mu (evar_open k n p')
Σ: Signature k: db_index n: evar p': Pattern
evar_open k n (patt_mu p') =
patt_mu (evar_open k n p')
reflexivity.Qed.(* More trivial but useful lemmas *)
Σ: Signature k: db_index n: svar x: evar
svar_open k n (patt_free_evar x) = patt_free_evar x
Σ: Signature k: db_index n: svar x: evar
svar_open k n (patt_free_evar x) = patt_free_evar x
reflexivity.Qed.
Σ: Signature k: db_index n, X: svar
svar_open k n (patt_free_svar X) = patt_free_svar X
Σ: Signature k: db_index n, X: svar
svar_open k n (patt_free_svar X) = patt_free_svar X
reflexivity.Qed.
Σ: Signature k: db_index n: svar x: db_index
svar_open k n (patt_bound_evar x) = patt_bound_evar x
Σ: Signature k: db_index n: svar x: db_index
svar_open k n (patt_bound_evar x) = patt_bound_evar x
reflexivity.Qed.
Σ: Signature k: db_index n: svar X: db_index
svar_open k n (patt_bound_svar X) =
match compare_nat X k with
| Nat_less _ _ _ => patt_bound_svar X
| Nat_equal _ _ _ => patt_free_svar n
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred X)
end
Σ: Signature k: db_index n: svar X: db_index
svar_open k n (patt_bound_svar X) =
match compare_nat X k with
| Nat_less _ _ _ => patt_bound_svar X
| Nat_equal _ _ _ => patt_free_svar n
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred X)
end
reflexivity.Qed.
Σ: Signature k: db_index n: svar s: symbols
svar_open k n (patt_sym s) = patt_sym s
Σ: Signature k: db_index n: svar s: symbols
svar_open k n (patt_sym s) = patt_sym s
reflexivity.Qed.
Σ: Signature k: db_index n: svar ls, rs: Pattern
svar_open k n (patt_app ls rs) =
patt_app (svar_open k n ls) (svar_open k n rs)
Σ: Signature k: db_index n: svar ls, rs: Pattern
svar_open k n (patt_app ls rs) =
patt_app (svar_open k n ls) (svar_open k n rs)
reflexivity.Qed.
Σ: Signature k: db_index n: svar
svar_open k n patt_bott = patt_bott
Σ: Signature k: db_index n: svar
svar_open k n patt_bott = patt_bott
reflexivity.Qed.
Σ: Signature k: db_index n: svar ls, rs: Pattern
svar_open k n (patt_imp ls rs) =
patt_imp (svar_open k n ls) (svar_open k n rs)
Σ: Signature k: db_index n: svar ls, rs: Pattern
svar_open k n (patt_imp ls rs) =
patt_imp (svar_open k n ls) (svar_open k n rs)
reflexivity.Qed.
Σ: Signature k: db_index n: svar p': Pattern
svar_open k n (patt_exists p') =
patt_exists (svar_open k n p')
Σ: Signature k: db_index n: svar p': Pattern
svar_open k n (patt_exists p') =
patt_exists (svar_open k n p')
reflexivity.Qed.
Σ: Signature k: db_index n: svar p': Pattern
svar_open k n (patt_mu p') =
patt_mu (svar_open (S k) n p')
Σ: Signature k: db_index n: svar p': Pattern
svar_open k n (patt_mu p') =
patt_mu (svar_open (S k) n p')
reflexivity.Qed.
Σ: Signature
∀ (k : db_index) (n : evar) (p : Pattern),
size p = size (evar_open k n p)
Σ: Signature
∀ (k : db_index) (n : evar) (p : Pattern),
size p = size (evar_open k n p)
Σ: Signature k: db_index n: evar p: Pattern
size p = size (evar_open k n p)
Σ: Signature n: evar p: Pattern
∀k : db_index, size p = size (evar_open k n p)
Σ: Signature n: evar n0, k: db_index
0 =
size
match compare_nat n0 k with
| Nat_less _ _ _ => patt_bound_evar n0
| Nat_equal _ _ _ => patt_free_evar n
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n0)
end
Σ: Signature n: evar p1, p2: Pattern IHp1: ∀k : db_index,
size p1 = size (evar_open k n p1) IHp2: ∀k : db_index,
size p2 = size (evar_open k n p2) k: db_index
apply positive_negative_occurrence_evar_open_and.Qed.(*Helper lemma for wf_body_to_wf_ex*)
Σ: Signature
∀ (phi : Pattern) (n : db_index) (x : evar),
well_formed_closed_ex_aux (evar_open n x phi) n =
true → well_formed_closed_ex_aux phi (S n) = true
Σ: Signature
∀ (phi : Pattern) (n : db_index) (x : evar),
well_formed_closed_ex_aux (evar_open n x phi) n =
true → well_formed_closed_ex_aux phi (S n) = true
Σ: Signature n, n0: db_index x: evar H: well_formed_closed_ex_aux
(evar_open n0 x (patt_bound_evar n)) n0 = true
well_formed_closed_ex_aux (patt_bound_evar n) (S n0) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(evar_open n x (patt_app phi1 phi2)) n = true
well_formed_closed_ex_aux (patt_app phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(evar_open n x (patt_imp phi1 phi2)) n = true
well_formed_closed_ex_aux (patt_imp phi1 phi2) (S n) =
true
Σ: Signature n, n0: db_index x: evar H: well_formed_closed_ex_aux
(evar_open n0 x (patt_bound_evar n)) n0 = true
well_formed_closed_ex_aux (patt_bound_evar n) (S n0) =
true
Σ: Signature n, n0: db_index x: evar H: well_formed_closed_ex_aux
(evar_open n0 x (patt_bound_evar n)) n0 = true
(if decide (n < S n0) then true else false) = true
Σ: Signature n, n0: db_index x: evar H: well_formed_closed_ex_aux
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred n)
end n0 = true
(if decide (n < S n0) then true else false) = true
Σ: Signature n, n0: db_index x: evar H: well_formed_closed_ex_aux
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred n)
end n0 = true
(if decide (n < S n0) then true else false) = true
Σ: Signature n, n0: db_index x: evar g: n > n0 H0: compare_nat n n0 = Nat_greater n n0 g H: well_formed_closed_ex_aux
(patt_bound_evar (Nat.pred n)) n0 = true n1: ¬ n < S n0 H1: decide (n < S n0) = right n1
false = true
Σ: Signature n, n0: db_index x: evar g: n > n0 H0: compare_nat n n0 = Nat_greater n n0 g H: (if decide (Nat.pred n < n0) then true else false) =
true n1: ¬ n < S n0 H1: decide (n < S n0) = right n1
false = true
Σ: Signature n, n0: db_index x: evar g: n > n0 H0: compare_nat n n0 = Nat_greater n n0 g l: Nat.pred n < n0 H2: decide (Nat.pred n < n0) = left l H: true = true n1: ¬ n < S n0 H1: decide (n < S n0) = right n1
false = true
lia.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(evar_open n x (patt_app phi1 phi2)) n = true
well_formed_closed_ex_aux (patt_app phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n &&
well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n = true
well_formed_closed_ex_aux (patt_app phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n &&
well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n = true
well_formed_closed_ex_aux phi1 (S n) &&
well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n = true
∧ well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
well_formed_closed_ex_aux phi1 (S n) &&
well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
well_formed_closed_ex_aux phi1 (S n) &&
well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
true && well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
well_formed_closed_ex_aux (evar_open n ?x phi1) n =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
true && well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
well_formed_closed_ex_aux (evar_open n ?x phi2) n =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
true && true = true
reflexivity.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(evar_open n x (patt_imp phi1 phi2)) n = true
well_formed_closed_ex_aux (patt_imp phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n &&
well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n = true
well_formed_closed_ex_aux (patt_imp phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n &&
well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n = true
well_formed_closed_ex_aux phi1 (S n) &&
well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n = true
∧ well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
well_formed_closed_ex_aux phi1 (S n) &&
well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
well_formed_closed_ex_aux phi1 (S n) &&
well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
true && well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
well_formed_closed_ex_aux (evar_open n ?x phi1) n =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
true && well_formed_closed_ex_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
well_formed_closed_ex_aux (evar_open n ?x phi2) n =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi1) n = true
→ well_formed_closed_ex_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (x : evar),
well_formed_closed_ex_aux
(evar_open n x phi2) n = true
→ well_formed_closed_ex_aux phi2 (S n) =
true n: db_index x: evar H1: well_formed_closed_ex_aux
(bevar_subst phi1 (patt_free_evar x) n) n =
true H2: well_formed_closed_ex_aux
(bevar_subst phi2 (patt_free_evar x) n) n =
true
true && true = true
reflexivity.Qed.(*Helper lemma for wf_body_to_wf_ex*)
Σ: Signature
∀ (phi : Pattern) (nn' : db_index) (x : evar),
well_formed_closed_mu_aux (evar_open n x phi) n' =
true → well_formed_closed_mu_aux phi n' = true
Σ: Signature
∀ (phi : Pattern) (nn' : db_index) (x : evar),
well_formed_closed_mu_aux (evar_open n x phi) n' =
true → well_formed_closed_mu_aux phi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(evar_open n x (patt_app phi1 phi2)) n' = true
well_formed_closed_mu_aux (patt_app phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(evar_open n x (patt_imp phi1 phi2)) n' = true
well_formed_closed_mu_aux (patt_imp phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(evar_open n x (patt_app phi1 phi2)) n' = true
well_formed_closed_mu_aux (patt_app phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' &&
well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux (patt_app phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' &&
well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true
∧ well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
true && well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux (evar_open ?n?x phi1) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
true && well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux (evar_open ?n?x phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
true && true = true
reflexivity.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(evar_open n x (patt_imp phi1 phi2)) n' = true
well_formed_closed_mu_aux (patt_imp phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' &&
well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux (patt_imp phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' &&
well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true
∧ well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
true && well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux (evar_open ?n?x phi1) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
true && well_formed_closed_mu_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
well_formed_closed_mu_aux (evar_open ?n?x phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi1) n' = true
→ well_formed_closed_mu_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (x : evar),
well_formed_closed_mu_aux
(evar_open n x phi2) n' = true
→ well_formed_closed_mu_aux phi2 n' = true n, n': db_index x: evar H1: well_formed_closed_mu_aux
(bevar_subst phi1 (patt_free_evar x) n) n' =
true H2: well_formed_closed_mu_aux
(bevar_subst phi2 (patt_free_evar x) n) n' =
true
true && true = true
reflexivity.Qed.
Σ: Signature
∀ (phi : Pattern) (nn' : db_index) (X : svar),
well_formed_closed_ex_aux (svar_open n X phi) n' =
true → well_formed_closed_ex_aux phi n' = true
Σ: Signature
∀ (phi : Pattern) (nn' : db_index) (X : svar),
well_formed_closed_ex_aux (svar_open n X phi) n' =
true → well_formed_closed_ex_aux phi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H: well_formed_closed_ex_aux
(svar_open n X (patt_app phi1 phi2)) n' = true
well_formed_closed_ex_aux (patt_app phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H: well_formed_closed_ex_aux
(svar_open n X (patt_imp phi1 phi2)) n' = true
well_formed_closed_ex_aux (patt_imp phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H: well_formed_closed_ex_aux
(svar_open n X (patt_app phi1 phi2)) n' = true
well_formed_closed_ex_aux (patt_app phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' &&
well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux (patt_app phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' &&
well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux phi1 n' &&
well_formed_closed_ex_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux phi1 n' &&
well_formed_closed_ex_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
true && well_formed_closed_ex_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux (svar_open ?n?X phi1) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
true && well_formed_closed_ex_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux (svar_open ?n?X phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
true && true = true
reflexivity.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H: well_formed_closed_ex_aux
(svar_open n X (patt_imp phi1 phi2)) n' = true
well_formed_closed_ex_aux (patt_imp phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' &&
well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux (patt_imp phi1 phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' &&
well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux phi1 n' &&
well_formed_closed_ex_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux phi1 n' &&
well_formed_closed_ex_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
true && well_formed_closed_ex_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux (svar_open ?n?X phi1) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
true && well_formed_closed_ex_aux phi2 n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
well_formed_closed_ex_aux (svar_open ?n?X phi2) n' =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi1) n' = true
→ well_formed_closed_ex_aux phi1 n' = true IHphi2: ∀ (nn' : db_index) (X : svar),
well_formed_closed_ex_aux
(svar_open n X phi2) n' = true
→ well_formed_closed_ex_aux phi2 n' = true n, n': db_index X: svar H0: well_formed_closed_ex_aux
(bsvar_subst phi1 (patt_free_svar X) n) n' =
true H1: well_formed_closed_ex_aux
(bsvar_subst phi2 (patt_free_svar X) n) n' =
true
true && true = true
reflexivity.Qed.
Σ: Signature
∀ (phi : Pattern) (n : db_index) (X : svar),
well_formed_closed_mu_aux (svar_open n X phi) n =
true → well_formed_closed_mu_aux phi (S n) = true
Σ: Signature
∀ (phi : Pattern) (n : db_index) (X : svar),
well_formed_closed_mu_aux (svar_open n X phi) n =
true → well_formed_closed_mu_aux phi (S n) = true
Σ: Signature n, n0: db_index X: svar H: well_formed_closed_mu_aux
(svar_open n0 X (patt_bound_svar n)) n0 = true
well_formed_closed_mu_aux (patt_bound_svar n) (S n0) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(svar_open n X (patt_app phi1 phi2)) n = true
well_formed_closed_mu_aux (patt_app phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(svar_open n X (patt_imp phi1 phi2)) n = true
well_formed_closed_mu_aux (patt_imp phi1 phi2) (S n) =
true
Σ: Signature n, n0: db_index X: svar H: well_formed_closed_mu_aux
(svar_open n0 X (patt_bound_svar n)) n0 = true
well_formed_closed_mu_aux (patt_bound_svar n) (S n0) =
true
Σ: Signature n, n0: db_index X: svar H: well_formed_closed_mu_aux
(svar_open n0 X (patt_bound_svar n)) n0 = true
(if decide (n < S n0) then true else false) = true
Σ: Signature n, n0: db_index X: svar H: well_formed_closed_mu_aux
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ =>
patt_bound_svar (Nat.pred n)
end n0 = true
(if decide (n < S n0) then true else false) = true
Σ: Signature n, n0: db_index X: svar H: well_formed_closed_mu_aux
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ =>
patt_bound_svar (Nat.pred n)
end n0 = true
(if decide (n < S n0) then true else false) = true
Σ: Signature n, n0: db_index X: svar g: n > n0 H0: compare_nat n n0 = Nat_greater n n0 g H: well_formed_closed_mu_aux
(patt_bound_svar (Nat.pred n)) n0 = true n1: ¬ n < S n0 H1: decide (n < S n0) = right n1
false = true
Σ: Signature n, n0: db_index X: svar g: n > n0 H0: compare_nat n n0 = Nat_greater n n0 g H: (if decide (Nat.pred n < n0) then true else false) =
true n1: ¬ n < S n0 H1: decide (n < S n0) = right n1
false = true
Σ: Signature n, n0: db_index X: svar g: n > n0 H0: compare_nat n n0 = Nat_greater n n0 g l: Nat.pred n < n0 H2: decide (Nat.pred n < n0) = left l H: true = true n1: ¬ n < S n0 H1: decide (n < S n0) = right n1
false = true
lia.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(svar_open n X (patt_app phi1 phi2)) n = true
well_formed_closed_mu_aux (patt_app phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n &&
well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n = true
well_formed_closed_mu_aux (patt_app phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n &&
well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n = true
well_formed_closed_mu_aux phi1 (S n) &&
well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n = true
∧ well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
well_formed_closed_mu_aux phi1 (S n) &&
well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
well_formed_closed_mu_aux phi1 (S n) &&
well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
true && well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
well_formed_closed_mu_aux (svar_open n ?X phi1) n =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
true && well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
well_formed_closed_mu_aux (svar_open n ?X phi2) n =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
true && true = true
reflexivity.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(svar_open n X (patt_imp phi1 phi2)) n = true
well_formed_closed_mu_aux (patt_imp phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n &&
well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n = true
well_formed_closed_mu_aux (patt_imp phi1 phi2) (S n) =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n &&
well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n = true
well_formed_closed_mu_aux phi1 (S n) &&
well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n = true
∧ well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
well_formed_closed_mu_aux phi1 (S n) &&
well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
well_formed_closed_mu_aux phi1 (S n) &&
well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
true && well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
well_formed_closed_mu_aux (svar_open n ?X phi1) n =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
true && well_formed_closed_mu_aux phi2 (S n) = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
well_formed_closed_mu_aux (svar_open n ?X phi2) n =
true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi1) n = true
→ well_formed_closed_mu_aux phi1 (S n) =
true IHphi2: ∀ (n : db_index) (X : svar),
well_formed_closed_mu_aux
(svar_open n X phi2) n = true
→ well_formed_closed_mu_aux phi2 (S n) =
true n: db_index X: svar H1: well_formed_closed_mu_aux
(bsvar_subst phi1 (patt_free_svar X) n) n =
true H2: well_formed_closed_mu_aux
(bsvar_subst phi2 (patt_free_svar X) n) n =
true
true && true = true
reflexivity.Qed.(* The following lemmas are trivial but useful for [rewrite !simpl_evar_open]. *)
bsvar_subst (patt_mu ϕ) ψ n =
patt_mu (bsvar_subst ϕ ψ (S n))
reflexivity.Qed.Endsubst.ModuleNotations.Declare Scope ml_scope.Notation"e ^[ 'evar:' dbi ↦ e' ]" := (bevar_subst e e' dbi) (at level2, e' at level200, left associativity,
format"e ^[ 'evar:' dbi ↦ e' ]" ) : ml_scope.Notation"e ^[ 'svar:' dbi ↦ e' ]" := (bsvar_subst e e' dbi) (at level2, e' at level200, left associativity,
format"e ^[ 'svar:' dbi ↦ e' ]" ) : ml_scope.Notation"e ^[[ 'evar:' x ↦ e' ]]" := (free_evar_subst e e' x) (at level2, e' at level200, left associativity,
format"e ^[[ 'evar:' x ↦ e' ]]" ) : ml_scope.Notation"e ^[[ 'svar:' X ↦ e' ]]" := (free_svar_subst e e' X) (at level2, e' at level200, left associativity,
format"e ^[[ 'svar:' X ↦ e' ]]" ) : ml_scope.Notation"e ^ [ e' ]" := (instantiate e e') (at level2, e' at level200, left associativity) : ml_scope.EndNotations.Import Notations.Open Scope ml_scope.Sectionsubst.Context {Σ : Signature}.
Σ: Signature
∀ (phipsi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux phi^[evar:n↦psi] n =
true
Σ: Signature
∀ (phipsi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux phi^[evar:n↦psi] n =
true
Σ: Signature phi, psi: Pattern n: nat H: well_formed_closed_ex_aux phi (S n) = true H0: well_formed_closed_ex_aux psi n = true
well_formed_closed_ex_aux phi^[evar:n↦psi] n = true
Σ: Signature phi, psi: Pattern
∀n : nat,
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux phi^[evar:n↦psi] n =
true
Σ: Signature phi: Pattern
∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux phi^[evar:n↦psi] n =
true
well_formed_closed_ex_aux
(patt_bound_evar n)^[evar:n'↦psi] n' = true
Σ: Signature n: db_index psi: Pattern n': nat H: (if decide (n < S n') then true else false) = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end n' = true
Σ: Signature n: db_index psi: Pattern n': nat H: (if decide (n < S n') then true else false) = true H0: well_formed_closed_ex_aux psi n' = true
(fix well_formed_closed_ex_aux
(phi : Pattern) (max_ind_evar : db_index) {struct
phi} : bool :=
match phi with
| patt_bound_evar n =>
if decide (n < max_ind_evar)
then true
else false
| patt_app psi1 psi2 | patt_imp psi1 psi2 =>
well_formed_closed_ex_aux psi1 max_ind_evar &&
well_formed_closed_ex_aux psi2 max_ind_evar
| patt_exists psi =>
well_formed_closed_ex_aux psi (S max_ind_evar)
| patt_mu psi =>
well_formed_closed_ex_aux psi max_ind_evar
| _ => true
end)
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end n' = true
Σ: Signature n: db_index psi: Pattern n': nat l: n < S n' H1: decide (n < S n') = left l H: true = true H0: well_formed_closed_ex_aux psi n' = true g: n > n' H2: compare_nat n n' = Nat_greater n n' g n0: ¬ Nat.pred n < n' H3: decide (Nat.pred n < n') = right n0
false = true
lia.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux
(patt_app phi1 phi2)^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1^[evar:n'↦psi] n' &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi1 (S n') &&
well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1^[evar:n'↦psi] n' &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi1 (S n') = true
∧ well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1^[evar:n'↦psi] n' &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1^[evar:n'↦psi] n' &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1 (S n') = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi2 (S n') = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true && true = true
reflexivity.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux
(patt_imp phi1 phi2)^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1^[evar:n'↦psi] n' &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi1 (S n') &&
well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1^[evar:n'↦psi] n' &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi1 (S n') = true
∧ well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1^[evar:n'↦psi] n' &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1^[evar:n'↦psi] n' &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi1 (S n') = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true &&
well_formed_closed_ex_aux phi2^[evar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi2 (S n') = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi1 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n↦psi] n = true IHphi2: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi2 (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n↦psi] n = true psi: Pattern n': nat H1: well_formed_closed_ex_aux phi1 (S n') = true H2: well_formed_closed_ex_aux phi2 (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true && true = true
reflexivity.
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux (patt_exists phi) (S n') =
true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux
(patt_exists phi)^[evar:n'↦psi] n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux (patt_exists phi) (S n') =
true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi^[evar:S n'↦psi] (S n') =
true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi^[evar:S n'↦psi] (S n') =
true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi (S (S n')) = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi (S n') = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi (S n') = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi (S n') = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
?ind_evar1 ≤ S n'
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi ?ind_evar1 = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S (S n')) = true H0: well_formed_closed_ex_aux psi n' = true
n' ≤ S n'
lia.
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux (patt_mu phi) (S n') =
true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux (patt_mu phi)^[evar:n'↦psi]
n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux (patt_mu phi) (S n') =
true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi^[evar:n'↦psi] n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi^[evar:n'↦psi] n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux phi (S n') = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
?ind_evar1 ≤ n'
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
well_formed_closed_ex_aux psi ?ind_evar1 = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
n' ≤ n'
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n : nat),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi^[evar:n↦psi] n = true psi: Pattern n': nat H: well_formed_closed_ex_aux phi (S n') = true H0: well_formed_closed_ex_aux psi n' = true
true = true
reflexivity.Qed.
Σ: Signature
∀ (phipsi : Pattern) (nn' : db_index),
well_formed_closed_mu_aux phi n' = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux phi^[evar:n↦psi] n' =
true
Σ: Signature
∀ (phipsi : Pattern) (nn' : db_index),
well_formed_closed_mu_aux phi n' = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux phi^[evar:n↦psi] n' =
true
Σ: Signature phi, psi: Pattern n, n': db_index H: well_formed_closed_mu_aux phi n' = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi^[evar:n↦psi] n' = true
Σ: Signature phi, psi: Pattern n': db_index H: well_formed_closed_mu_aux phi n' = true H0: well_formed_closed_mu_aux psi n' = true
∀n : db_index,
well_formed_closed_mu_aux phi^[evar:n↦psi] n' = true
Σ: Signature phi, psi: Pattern
∀n' : db_index,
well_formed_closed_mu_aux phi n' = true
→ well_formed_closed_mu_aux psi n' = true
→ ∀n : db_index,
well_formed_closed_mu_aux phi^[evar:n↦psi] n' =
true
Σ: Signature phi: Pattern
∀ (psi : Pattern) (n' : db_index),
well_formed_closed_mu_aux phi n' = true
→ well_formed_closed_mu_aux psi n' = true
→ ∀n : db_index,
well_formed_closed_mu_aux phi^[evar:n↦psi] n' =
true
well_formed_closed_mu_aux
(patt_bound_svar n)^[svar:n'↦psi] n' = true
Σ: Signature n: db_index psi: Pattern n': nat H: (if decide (n < S n') then true else false) = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end n' = true
Σ: Signature n: db_index psi: Pattern n': nat H: (if decide (n < S n') then true else false) = true H0: well_formed_closed_mu_aux psi n' = true
(fix well_formed_closed_mu_aux
(phi : Pattern) (max_ind_svar : db_index) {struct
phi} : bool :=
match phi with
| patt_bound_svar n =>
if decide (n < max_ind_svar)
then true
else false
| patt_app psi1 psi2 | patt_imp psi1 psi2 =>
well_formed_closed_mu_aux psi1 max_ind_svar &&
well_formed_closed_mu_aux psi2 max_ind_svar
| patt_exists psi =>
well_formed_closed_mu_aux psi max_ind_svar
| patt_mu psi =>
well_formed_closed_mu_aux psi (S max_ind_svar)
| _ => true
end)
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end n' = true
Σ: Signature n: db_index psi: Pattern n': nat l: n < S n' H1: decide (n < S n') = left l H: true = true H0: well_formed_closed_mu_aux psi n' = true g: n > n' H2: compare_nat n n' = Nat_greater n n' g n0: ¬ Nat.pred n < n' H3: decide (Nat.pred n < n') = right n0
false = true
lia.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux
(patt_app phi1 phi2)^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi1^[svar:n'↦psi] n' &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi1 (S n') &&
well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi1^[svar:n'↦psi] n' &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi1^[svar:n'↦psi] n' &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi1 (S n') = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi2 (S n') = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true && true = true
reflexivity.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux
(patt_imp phi1 phi2)^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi1^[svar:n'↦psi] n' &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi1 (S n') &&
well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi1^[svar:n'↦psi] n' &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi1^[svar:n'↦psi] n' &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi1 (S n') = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true &&
well_formed_closed_mu_aux phi2^[svar:n'↦psi] n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi2 (S n') = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true && true = true
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi1 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n' = true IHphi2: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi2 (S n') =
true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n' = true psi: Pattern n': nat H1: well_formed_closed_mu_aux phi1 (S n') = true H2: well_formed_closed_mu_aux phi2 (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true && true = true
reflexivity.
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux (patt_exists phi) (S n') =
true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux
(patt_exists phi)^[svar:n'↦psi] n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux (patt_exists phi) (S n') =
true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi^[svar:n'↦psi] n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi^[svar:n'↦psi] n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi (S n') = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S n') = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S n') = true H0: well_formed_closed_mu_aux psi n' = true
true = true
reflexivity.
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux (patt_mu phi) (S n') =
true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux (patt_mu phi)^[svar:n'↦psi]
n' = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux (patt_mu phi) (S n') =
true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi^[svar:S n'↦psi] (S n') =
true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi^[svar:S n'↦psi] (S n') =
true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux phi (S (S n')) = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi (S n') = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi (S n') = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
?ind_svar1 ≤ S n'
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
well_formed_closed_mu_aux psi ?ind_svar1 = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
n' ≤ S n'
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
true = true
Σ: Signature phi: Pattern IHphi: ∀ (psi : Pattern) (n' : nat),
well_formed_closed_mu_aux phi (S n') = true
→ well_formed_closed_mu_aux psi n' = true
→ well_formed_closed_mu_aux
phi^[svar:n'↦psi] n' = true psi: Pattern n': nat H: well_formed_closed_mu_aux phi (S (S n')) = true H0: well_formed_closed_mu_aux psi n' = true
true = true
reflexivity.Qed.(*Helper lemma for wf_ex_to_wf_body *)
Σ: Signature
∀ (phi : Pattern) (n : nat) (x : evar),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux (evar_open n x phi) n =
true
Σ: Signature
∀ (phi : Pattern) (n : nat) (x : evar),
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux (evar_open n x phi) n =
true
well_formed_closed_mu_aux
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end n0 = true
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_mu_aux
(patt_bound_svar n) (S n0) = true Hwf2: well_formed_closed_mu_aux psi n0 l: n < n' H0: compare_nat n n' = Nat_less n n' l
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_mu_aux
(patt_bound_svar n) (S n0) = true Hwf2: well_formed_closed_mu_aux psi n0 g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_mu_aux
(patt_bound_svar n) (S n0) = true Hwf2: well_formed_closed_mu_aux psi n0 l: n < n' H0: compare_nat n n' = Nat_less n n' l
(if decide (n < n0) then true else false) = true
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_mu_aux
(patt_bound_svar n) (S n0) = true Hwf2: well_formed_closed_mu_aux psi n0 g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_mu_aux
(patt_bound_svar n) (S n0) = true Hwf2: well_formed_closed_mu_aux psi n0 g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: (if decide (n < S n0) then true else false) =
true Hwf2: well_formed_closed_mu_aux psi n0 g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 l: n < S n0 H1: decide (n < S n0) = left l Hwf1: true = true Hwf2: well_formed_closed_mu_aux psi n0 g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 l: n < S n0 H1: decide (n < S n0) = left l Hwf1: true = true Hwf2: well_formed_closed_mu_aux psi n0 g: n > n' H0: compare_nat n n' = Nat_greater n n' g
(if decide (Nat.pred n < n0) then true else false) =
true
case_match; lia.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (nn' : nat),
n' ≤ n
→ well_formed_closed_mu_aux phi1 (S n) =
true
→ well_formed_closed_mu_aux psi n
→ well_formed_closed_mu_aux
phi1^[svar:n'↦psi] n = true IHphi2: ∀ (psi : Pattern) (nn' : nat),
n' ≤ n
→ well_formed_closed_mu_aux phi2 (S n) =
true
→ well_formed_closed_mu_aux psi n
→ well_formed_closed_mu_aux
phi2^[svar:n'↦psi] n = true psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n0) = true Hwf2: well_formed_closed_mu_aux psi n0
well_formed_closed_ex_aux
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end n0 = true
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_ex_aux
(patt_bound_evar n) (S n0) = true Hwf2: well_formed_closed_ex_aux psi n0 = true l: n < n' H0: compare_nat n n' = Nat_less n n' l
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_ex_aux
(patt_bound_evar n) (S n0) = true Hwf2: well_formed_closed_ex_aux psi n0 = true g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_ex_aux
(patt_bound_evar n) (S n0) = true Hwf2: well_formed_closed_ex_aux psi n0 = true l: n < n' H0: compare_nat n n' = Nat_less n n' l
(if decide (n < n0) then true else false) = true
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_ex_aux
(patt_bound_evar n) (S n0) = true Hwf2: well_formed_closed_ex_aux psi n0 = true g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_ex_aux
(patt_bound_evar n) (S n0) = true Hwf2: well_formed_closed_ex_aux psi n0 = true g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: (if decide (n < S n0) then true else false) =
true Hwf2: well_formed_closed_ex_aux psi n0 = true g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 l: n < S n0 H1: decide (n < S n0) = left l Hwf1: true = true Hwf2: well_formed_closed_ex_aux psi n0 = true g: n > n' H0: compare_nat n n' = Nat_greater n n' g
Σ: Signature n: db_index psi: Pattern n0, n': nat H: n' ≤ n0 l: n < S n0 H1: decide (n < S n0) = left l Hwf1: true = true Hwf2: well_formed_closed_ex_aux psi n0 = true g: n > n' H0: compare_nat n n' = Nat_greater n n' g
(if decide (Nat.pred n < n0) then true else false) =
true
case_match; lia.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (psi : Pattern) (nn' : nat),
n' ≤ n
→ well_formed_closed_ex_aux phi1 (S n) =
true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi1^[evar:n'↦psi] n = true IHphi2: ∀ (psi : Pattern) (nn' : nat),
n' ≤ n
→ well_formed_closed_ex_aux phi2 (S n) =
true
→ well_formed_closed_ex_aux psi n = true
→ well_formed_closed_ex_aux
phi2^[evar:n'↦psi] n = true psi: Pattern n0, n': nat H: n' ≤ n0 Hwf1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n0) = true Hwf2: well_formed_closed_ex_aux psi n0 = true
∀ (phi : Pattern) (nn' : nat) (X : svar),
n' ≤ n
→ well_formed_closed_mu_aux phi (S n) = true
→ well_formed_closed_mu_aux (svar_open n' X phi) n =
true
Σ: Signature
∀ (phi : Pattern) (nn' : nat) (X : svar),
n' ≤ n
→ well_formed_closed_mu_aux phi (S n) = true
→ well_formed_closed_mu_aux (svar_open n' X phi) n =
true
Σ: Signature phi: Pattern n, n': nat X: svar H: n' ≤ n H0: well_formed_closed_mu_aux phi (S n) = true
well_formed_closed_mu_aux (svar_open n' X phi) n =
true
nowapply wfc_mu_aux_bsvar_subst_le.Qed.
Σ: Signature
∀ (phi : Pattern) (nn' : nat) (X : evar),
n' ≤ n
→ well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux (evar_open n' X phi) n =
true
Σ: Signature
∀ (phi : Pattern) (nn' : nat) (X : evar),
n' ≤ n
→ well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux (evar_open n' X phi) n =
true
Σ: Signature phi: Pattern n, n': nat X: evar H: n' ≤ n H0: well_formed_closed_ex_aux phi (S n) = true
well_formed_closed_ex_aux (evar_open n' X phi) n =
true
nowapply wfc_ex_aux_bsvar_subst_le.Qed.
Σ: Signature
∀ (phi : Pattern) (n : nat) (x : evar),
well_formed_closed_ex_aux phi (S n) = true
↔ well_formed_closed_ex_aux (evar_open n x phi) n =
true
Σ: Signature
∀ (phi : Pattern) (n : nat) (x : evar),
well_formed_closed_ex_aux phi (S n) = true
↔ well_formed_closed_ex_aux (evar_open n x phi) n =
true
Σ: Signature phi: Pattern n: nat x: evar
well_formed_closed_ex_aux phi (S n) = true
→ well_formed_closed_ex_aux (evar_open n x phi) n =
true
Σ: Signature phi: Pattern n: nat x: evar
well_formed_closed_ex_aux (evar_open n x phi) n = true
→ well_formed_closed_ex_aux phi (S n) = true
Σ: Signature phi: Pattern n: nat x: evar
well_formed_closed_ex_aux (evar_open n x phi) n = true
→ well_formed_closed_ex_aux phi (S n) = true
apply wfc_ex_aux_body_ex_imp2.Qed.
Σ: Signature
∀ (phi : Pattern) (n : nat) (X : svar),
well_formed_closed_mu_aux phi (S n) = true
↔ well_formed_closed_mu_aux (svar_open n X phi) n =
true
Σ: Signature
∀ (phi : Pattern) (n : nat) (X : svar),
well_formed_closed_mu_aux phi (S n) = true
↔ well_formed_closed_mu_aux (svar_open n X phi) n =
true
Σ: Signature phi: Pattern n: nat X: svar
well_formed_closed_mu_aux phi (S n) = true
→ well_formed_closed_mu_aux (svar_open n X phi) n =
true
Σ: Signature phi: Pattern n: nat X: svar
well_formed_closed_mu_aux (svar_open n X phi) n = true
→ well_formed_closed_mu_aux phi (S n) = true
Σ: Signature phi: Pattern n: nat X: svar
well_formed_closed_mu_aux (svar_open n X phi) n = true
→ well_formed_closed_mu_aux phi (S n) = true
apply wfc_mu_aux_body_mu_imp2.Qed.(*If (ex, phi) is closed, then its body is closed too*)
(if decide (x = x0)
then patt_bound_evar n'
else patt_free_evar x0)^[evar:n'↦patt_free_evar x] =
patt_free_evar x0
Σ: Signature x: evar n, n': db_index H: well_formed_closed_ex_aux (patt_bound_evar n) n'
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end = patt_bound_evar n
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ evar_open n x (evar_quantify x n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ evar_open n x (evar_quantify x n phi2) =
phi2 n': db_index H: well_formed_closed_ex_aux (patt_app phi1 phi2) n'
patt_app
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ evar_open n x (evar_quantify x n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ evar_open n x (evar_quantify x n phi2) =
phi2 n': db_index H: well_formed_closed_ex_aux (patt_imp phi1 phi2) n'
patt_imp
(evar_quantify x n' phi1)^[evar:n'↦
patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦
patt_free_evar x] = patt_imp phi1 phi2
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ evar_open n x (evar_quantify x n phi) =
phi n': db_index H: well_formed_closed_ex_aux (patt_exists phi) n'
patt_exists
(evar_quantify x (S n') phi)^[evar:
S n'↦patt_free_evar x] =
patt_exists phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ evar_open n x (evar_quantify x n phi) =
phi n': db_index H: well_formed_closed_ex_aux (patt_mu phi) n'
patt_mu
(evar_quantify x n' phi)^[evar:n'↦
patt_free_evar x] = patt_mu phi
match compare_nat n' n' with
| Nat_less _ _ _ => patt_bound_evar n'
| Nat_equal _ _ _ => patt_free_evar x0
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n')
end = patt_free_evar x0
break_match_goal; auto; lia.
Σ: Signature x, x0: evar n': db_index H: well_formed_closed_ex_aux (patt_free_evar x0) n' n: x ≠ x0
patt_free_evar x0 = patt_free_evar x0
reflexivity.
Σ: Signature x: evar n, n': db_index H: well_formed_closed_ex_aux (patt_bound_evar n) n'
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end = patt_bound_evar n
Σ: Signature x: evar n, n': db_index H: if decide (n < n') then true else false
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end = patt_bound_evar n
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ evar_open n x (evar_quantify x n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ evar_open n x (evar_quantify x n phi2) =
phi2 n': db_index H: well_formed_closed_ex_aux (patt_app phi1 phi2) n'
patt_app
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ evar_open n x (evar_quantify x n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ evar_open n x (evar_quantify x n phi2) =
phi2 n': db_index H: well_formed_closed_ex_aux phi1 n' &&
well_formed_closed_ex_aux phi2 n'
patt_app
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ evar_open n x (evar_quantify x n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ evar_open n x (evar_quantify x n phi2) =
phi2 n': db_index H: well_formed_closed_ex_aux phi1 n' &&
well_formed_closed_ex_aux phi2 n'
patt_app
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi1)^[evar:n↦
patt_free_evar x] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi2)^[evar:n↦
patt_free_evar x] = phi2 n': db_index H: well_formed_closed_ex_aux phi1 n' &&
well_formed_closed_ex_aux phi2 n'
patt_app
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi1)^[evar:n↦
patt_free_evar x] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi2)^[evar:n↦
patt_free_evar x] = phi2 n': db_index H: well_formed_closed_ex_aux phi1 n' = true
∧ well_formed_closed_ex_aux phi2 n' = true
patt_app
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi1)^[evar:n↦
patt_free_evar x] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi2)^[evar:n↦
patt_free_evar x] = phi2 n': db_index H1: well_formed_closed_ex_aux phi1 n' = true H2: well_formed_closed_ex_aux phi2 n' = true
patt_app
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi1)^[evar:n↦
patt_free_evar x] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi2)^[evar:n↦
patt_free_evar x] = phi2 n': db_index H1: well_formed_closed_ex_aux phi1 n' = true H2: well_formed_closed_ex_aux phi2 n' = true
patt_app phi1 phi2 = patt_app phi1 phi2
reflexivity.
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ evar_open n x (evar_quantify x n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ evar_open n x (evar_quantify x n phi2) =
phi2 n': db_index H: well_formed_closed_ex_aux (patt_imp phi1 phi2) n'
patt_imp
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ evar_open n x (evar_quantify x n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ evar_open n x (evar_quantify x n phi2) =
phi2 n': db_index H: well_formed_closed_ex_aux phi1 n' &&
well_formed_closed_ex_aux phi2 n'
patt_imp
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi1)^[evar:n↦
patt_free_evar x] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi2)^[evar:n↦
patt_free_evar x] = phi2 n': db_index H: well_formed_closed_ex_aux phi1 n' &&
well_formed_closed_ex_aux phi2 n'
patt_imp
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi1)^[evar:n↦
patt_free_evar x] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi2)^[evar:n↦
patt_free_evar x] = phi2 n': db_index H: well_formed_closed_ex_aux phi1 n' = true
∧ well_formed_closed_ex_aux phi2 n' = true
patt_imp
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi1)^[evar:n↦
patt_free_evar x] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi2)^[evar:n↦
patt_free_evar x] = phi2 n': db_index H1: well_formed_closed_ex_aux phi1 n' = true H2: well_formed_closed_ex_aux phi2 n' = true
patt_imp
(evar_quantify x n' phi1)^[evar:n'↦patt_free_evar x]
(evar_quantify x n' phi2)^[evar:n'↦patt_free_evar x] =
patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_ex_aux phi1 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi1)^[evar:n↦
patt_free_evar x] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_ex_aux phi2 n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu
(evar_quantify x level p')
end) x n phi2)^[evar:n↦
patt_free_evar x] = phi2 n': db_index H1: well_formed_closed_ex_aux phi1 n' = true H2: well_formed_closed_ex_aux phi2 n' = true
patt_imp phi1 phi2 = patt_imp phi1 phi2
reflexivity.
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ evar_open n x (evar_quantify x n phi) =
phi n': db_index H: well_formed_closed_ex_aux (patt_exists phi) n'
patt_exists
(evar_quantify x (S n') phi)^[evar:S n'↦patt_free_evar
x] =
patt_exists phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ evar_open n x (evar_quantify x n phi) =
phi n': db_index H: well_formed_closed_ex_aux phi (S n')
patt_exists
(evar_quantify x (S n') phi)^[evar:S n'↦patt_free_evar
x] =
patt_exists phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu (evar_quantify x level p')
end) x n phi)^[evar:n↦
patt_free_evar x] = phi n': db_index H: well_formed_closed_ex_aux phi (S n')
patt_exists
(evar_quantify x (S n') phi)^[evar:S n'↦patt_free_evar
x] =
patt_exists phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ ((fix evar_quantify
(x : evar) (level : db_index)
(p : Pattern) {struct p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' =>
patt_free_svar x'
| patt_bound_evar x' =>
patt_bound_evar x'
| patt_bound_svar X =>
patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp
(evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists
(evar_quantify x (S level) p')
| patt_mu p' =>
patt_mu (evar_quantify x level p')
end) x n phi)^[evar:n↦
patt_free_evar x] = phi n': db_index H: well_formed_closed_ex_aux phi (S n')
patt_exists phi = patt_exists phi
reflexivity.
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ evar_open n x (evar_quantify x n phi) =
phi n': db_index H: well_formed_closed_ex_aux (patt_mu phi) n'
patt_mu
(evar_quantify x n' phi)^[evar:n'↦patt_free_evar x] =
patt_mu phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ evar_open n x (evar_quantify x n phi) =
phi n': db_index H: well_formed_closed_ex_aux phi n'
patt_mu
(evar_quantify x n' phi)^[evar:n'↦patt_free_evar x] =
patt_mu phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ evar_open n x (evar_quantify x n phi) =
phi n': db_index H: evar_open n' x (evar_quantify x n' phi) = phi
patt_mu
(evar_quantify x n' phi)^[evar:n'↦patt_free_evar x] =
patt_mu phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ evar_open n x (evar_quantify x n phi) =
phi n': db_index H: (evar_quantify x n' phi)^[evar:n'↦
patt_free_evar x] = phi
patt_mu
(evar_quantify x n' phi)^[evar:n'↦patt_free_evar x] =
patt_mu phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_ex_aux phi n
→ evar_open n x (evar_quantify x n phi) =
phi n': db_index H: (evar_quantify x n' phi)^[evar:n'↦
patt_free_evar x] = phi
patt_mu phi = patt_mu phi
reflexivity.Qed.
Σ: Signature X: svar n: db_index phi: Pattern
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) = phi
Σ: Signature X: svar n: db_index phi: Pattern
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) = phi
(if decide (X = x)
then patt_bound_svar n'
else patt_free_svar x)^[svar:n'↦patt_free_svar X] =
patt_free_svar x
Σ: Signature X: svar n, n': db_index H: well_formed_closed_mu_aux (patt_bound_svar n) n'
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = patt_bound_svar n
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ svar_open n X (svar_quantify X n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ svar_open n X (svar_quantify X n phi2) =
phi2 n': db_index H: well_formed_closed_mu_aux (patt_app phi1 phi2) n'
patt_app
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ svar_open n X (svar_quantify X n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ svar_open n X (svar_quantify X n phi2) =
phi2 n': db_index H: well_formed_closed_mu_aux (patt_imp phi1 phi2) n'
patt_imp
(svar_quantify X n' phi1)^[svar:n'↦
patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦
patt_free_svar X] = patt_imp phi1 phi2
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) =
phi n': db_index H: well_formed_closed_mu_aux (patt_exists phi) n'
patt_exists
(svar_quantify X n' phi)^[svar:n'↦
patt_free_svar X] = patt_exists phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) =
phi n': db_index H: well_formed_closed_mu_aux (patt_mu phi) n'
patt_mu
(svar_quantify X (S n') phi)^[svar:
S n'↦patt_free_svar X] =
patt_mu phi
match compare_nat n' n' with
| Nat_less _ _ _ => patt_bound_svar n'
| Nat_equal _ _ _ => patt_free_svar x
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n')
end = patt_free_svar x
Σ: Signature X, x: svar n': db_index H: well_formed_closed_mu_aux (patt_free_svar x) n' n: X ≠ x
match compare_nat n' n' with
| Nat_less _ _ _ => patt_bound_svar n'
| Nat_equal _ _ _ => patt_free_svar x
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n')
end = patt_free_svar x
break_match_goal; auto; lia.
Σ: Signature X, x: svar n': db_index H: well_formed_closed_mu_aux (patt_free_svar x) n' n: X ≠ x
patt_free_svar x = patt_free_svar x
reflexivity.
Σ: Signature X: svar n, n': db_index H: well_formed_closed_mu_aux (patt_bound_svar n) n'
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = patt_bound_svar n
Σ: Signature X: svar n, n': db_index H: if decide (n < n') then true else false
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = patt_bound_svar n
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ svar_open n X (svar_quantify X n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ svar_open n X (svar_quantify X n phi2) =
phi2 n': db_index H: well_formed_closed_mu_aux (patt_app phi1 phi2) n'
patt_app
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ svar_open n X (svar_quantify X n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ svar_open n X (svar_quantify X n phi2) =
phi2 n': db_index H: well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n'
patt_app
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ svar_open n X (svar_quantify X n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ svar_open n X (svar_quantify X n phi2) =
phi2 n': db_index H: well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n'
patt_app
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ (svar_quantify X n phi1)^[svar:n↦
patt_free_svar X] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ (svar_quantify X n phi2)^[svar:n↦
patt_free_svar X] = phi2 n': db_index H: well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n'
patt_app
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ (svar_quantify X n phi1)^[svar:n↦
patt_free_svar X] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ (svar_quantify X n phi2)^[svar:n↦
patt_free_svar X] = phi2 n': db_index H: well_formed_closed_mu_aux phi1 n' = true
∧ well_formed_closed_mu_aux phi2 n' = true
patt_app
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ (svar_quantify X n phi1)^[svar:n↦
patt_free_svar X] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ (svar_quantify X n phi2)^[svar:n↦
patt_free_svar X] = phi2 n': db_index H1: well_formed_closed_mu_aux phi1 n' = true H2: well_formed_closed_mu_aux phi2 n' = true
patt_app
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ (svar_quantify X n phi1)^[svar:n↦
patt_free_svar X] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ (svar_quantify X n phi2)^[svar:n↦
patt_free_svar X] = phi2 n': db_index H1: well_formed_closed_mu_aux phi1 n' = true H2: well_formed_closed_mu_aux phi2 n' = true
patt_app phi1 phi2 = patt_app phi1 phi2
reflexivity.
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ svar_open n X (svar_quantify X n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ svar_open n X (svar_quantify X n phi2) =
phi2 n': db_index H: well_formed_closed_mu_aux (patt_imp phi1 phi2) n'
patt_imp
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ svar_open n X (svar_quantify X n phi1) =
phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ svar_open n X (svar_quantify X n phi2) =
phi2 n': db_index H: well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n'
patt_imp
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ (svar_quantify X n phi1)^[svar:n↦
patt_free_svar X] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ (svar_quantify X n phi2)^[svar:n↦
patt_free_svar X] = phi2 n': db_index H: well_formed_closed_mu_aux phi1 n' &&
well_formed_closed_mu_aux phi2 n'
patt_imp
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ (svar_quantify X n phi1)^[svar:n↦
patt_free_svar X] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ (svar_quantify X n phi2)^[svar:n↦
patt_free_svar X] = phi2 n': db_index H: well_formed_closed_mu_aux phi1 n' = true
∧ well_formed_closed_mu_aux phi2 n' = true
patt_imp
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ (svar_quantify X n phi1)^[svar:n↦
patt_free_svar X] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ (svar_quantify X n phi2)^[svar:n↦
patt_free_svar X] = phi2 n': db_index H1: well_formed_closed_mu_aux phi1 n' = true H2: well_formed_closed_mu_aux phi2 n' = true
patt_imp
(svar_quantify X n' phi1)^[svar:n'↦patt_free_svar X]
(svar_quantify X n' phi2)^[svar:n'↦patt_free_svar X] =
patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : db_index,
well_formed_closed_mu_aux phi1 n
→ (svar_quantify X n phi1)^[svar:n↦
patt_free_svar X] = phi1 IHphi2: ∀n : db_index,
well_formed_closed_mu_aux phi2 n
→ (svar_quantify X n phi2)^[svar:n↦
patt_free_svar X] = phi2 n': db_index H1: well_formed_closed_mu_aux phi1 n' = true H2: well_formed_closed_mu_aux phi2 n' = true
patt_imp phi1 phi2 = patt_imp phi1 phi2
reflexivity.
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) =
phi n': db_index H: well_formed_closed_mu_aux (patt_exists phi) n'
patt_exists
(svar_quantify X n' phi)^[svar:n'↦patt_free_svar X] =
patt_exists phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) =
phi n': db_index H: well_formed_closed_mu_aux phi n'
patt_exists
(svar_quantify X n' phi)^[svar:n'↦patt_free_svar X] =
patt_exists phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ (svar_quantify X n phi)^[svar:n↦
patt_free_svar X] = phi n': db_index H: well_formed_closed_mu_aux phi n'
patt_exists
(svar_quantify X n' phi)^[svar:n'↦patt_free_svar X] =
patt_exists phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ (svar_quantify X n phi)^[svar:n↦
patt_free_svar X] = phi n': db_index H: well_formed_closed_mu_aux phi n'
patt_exists phi = patt_exists phi
reflexivity.
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) =
phi n': db_index H: well_formed_closed_mu_aux (patt_mu phi) n'
patt_mu
(svar_quantify X (S n') phi)^[svar:S n'↦patt_free_svar
X] =
patt_mu phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) =
phi n': db_index H: well_formed_closed_mu_aux phi (S n')
patt_mu
(svar_quantify X (S n') phi)^[svar:S n'↦patt_free_svar
X] =
patt_mu phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) =
phi n': db_index H: svar_open (S n') X (svar_quantify X (S n') phi) =
phi
patt_mu
(svar_quantify X (S n') phi)^[svar:S n'↦patt_free_svar
X] =
patt_mu phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) =
phi n': db_index H: (svar_quantify X (S n') phi)^[svar:
S n'↦patt_free_svar X] = phi
patt_mu
(svar_quantify X (S n') phi)^[svar:S n'↦patt_free_svar
X] =
patt_mu phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : db_index,
well_formed_closed_mu_aux phi n
→ svar_open n X (svar_quantify X n phi) =
phi n': db_index H: (svar_quantify X (S n') phi)^[svar:
S n'↦patt_free_svar X] = phi
patt_mu phi = patt_mu phi
reflexivity.Qed.
Σ: Signature x: evar n: nat phi: Pattern
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n (evar_open n x phi) = phi
Σ: Signature x: evar n: nat phi: Pattern
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n (evar_open n x phi) = phi
Σ: Signature x: evar phi: Pattern
∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n (evar_open n x phi) = phi
Σ: Signature x, x0: evar n': nat H0: x ∉ free_evars (patt_free_evar x0) H1: well_formed_closed_ex_aux (patt_free_evar x0)
(S n')
(if decide (x = x0)
then patt_bound_evar n'
else patt_free_evar x0) = patt_free_evar x0
Σ: Signature x: evar n: db_index n': nat H0: x ∉ free_evars (patt_bound_evar n) H1: well_formed_closed_ex_aux (patt_bound_evar n)
(S n')
evar_quantify x n'
(evar_open n' x (patt_bound_evar n)) =
patt_bound_evar n
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n (evar_open n x phi1) =
phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n (evar_open n x phi2) =
phi2 n': nat H0: x ∉ free_evars (patt_app phi1 phi2) H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n')
patt_app
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n (evar_open n x phi1) =
phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n (evar_open n x phi2) =
phi2 n': nat H0: x ∉ free_evars (patt_imp phi1 phi2) H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n')
patt_imp
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_imp phi1 phi2
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n (evar_open n x phi) =
phi n': nat H0: x ∉ free_evars (patt_exists phi) H1: well_formed_closed_ex_aux
(patt_exists phi) (S n')
patt_exists
(evar_quantify x (S n')
phi^[evar:S n'↦patt_free_evar x]) =
patt_exists phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n (evar_open n x phi) =
phi n': nat H0: x ∉ free_evars (patt_mu phi) H1: well_formed_closed_ex_aux (patt_mu phi) (S n')
patt_mu
(evar_quantify x n' phi^[evar:n'↦patt_free_evar x]) =
patt_mu phi
Σ: Signature x, x0: evar n': nat H0: x ∉ free_evars (patt_free_evar x0) H1: well_formed_closed_ex_aux (patt_free_evar x0)
(S n')
(if decide (x = x0)
then patt_bound_evar n'
else patt_free_evar x0) = patt_free_evar x0
Σ: Signature x, x0: evar n': nat H0: x ∉ free_evars (patt_free_evar x0) H1: well_formed_closed_ex_aux (patt_free_evar x0)
(S n') e: x = x0
patt_bound_evar n' = patt_free_evar x0
Σ: Signature x, x0: evar n': nat H0: x ∉ free_evars (patt_free_evar x0) H1: well_formed_closed_ex_aux (patt_free_evar x0)
(S n') n: x ≠ x0
patt_free_evar x0 = patt_free_evar x0
Σ: Signature x, x0: evar n': nat H0: x ∉ free_evars (patt_free_evar x0) H1: well_formed_closed_ex_aux (patt_free_evar x0)
(S n') e: x = x0
Σ: Signature x, x0: evar n': nat H0: x ∉ free_evars (patt_free_evar x0) H1: well_formed_closed_ex_aux (patt_free_evar x0)
(S n') n: x ≠ x0
patt_free_evar x0 = patt_free_evar x0
reflexivity.
Σ: Signature x: evar n: db_index n': nat H0: x ∉ free_evars (patt_bound_evar n) H1: well_formed_closed_ex_aux (patt_bound_evar n)
(S n')
evar_quantify x n'
(evar_open n' x (patt_bound_evar n)) =
patt_bound_evar n
Σ: Signature x: evar n: db_index n': nat H0: x ∉ ∅ H1: if decide (n < S n') then true else false
evar_quantify x n'
(evar_open n' x (patt_bound_evar n)) =
patt_bound_evar n
Σ: Signature x: evar n: db_index n': nat H0: x ∉ ∅ H1: if decide (n < S n') then true else false
(fix evar_quantify
(x : evar) (level : db_index) (p : Pattern) {struct
p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' => patt_free_svar x'
| patt_bound_evar x' => patt_bound_evar x'
| patt_bound_svar X => patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app (evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp (evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists (evar_quantify x (S level) p')
| patt_mu p' => patt_mu (evar_quantify x level p')
end) x n'
(patt_bound_evar n)^[evar:n'↦patt_free_evar x] =
patt_bound_evar n
Σ: Signature x: evar n: db_index n': nat H0: x ∉ ∅ H1: if decide (n < S n') then true else false
(fix evar_quantify
(x : evar) (level : db_index) (p : Pattern) {struct
p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' => patt_free_svar x'
| patt_bound_evar x' => patt_bound_evar x'
| patt_bound_svar X => patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app (evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp (evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists (evar_quantify x (S level) p')
| patt_mu p' => patt_mu (evar_quantify x level p')
end) x n'
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end = patt_bound_evar n
Σ: Signature x: evar n: db_index n': nat H0: x ∉ ∅ l: n < S n' H: decide (n < S n') = left l H1: true g: n > n' H2: compare_nat n n' = Nat_greater n n' g
patt_bound_evar (Nat.pred n) = patt_bound_evar n
lia.
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n (evar_open n x phi1) =
phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n (evar_open n x phi2) =
phi2 n': nat H0: x ∉ free_evars (patt_app phi1 phi2) H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n')
patt_app
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H0: x ∉ free_evars (patt_app phi1 phi2) H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n')
patt_app
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') H0: (x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 |
patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1)
∧ x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 |
patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
patt_app
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
patt_app
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
patt_app phi1 phi2 = patt_app phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
x ∉ free_evars phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
well_formed_closed_ex_aux phi2 (S n')
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
x ∉ free_evars phi1
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
well_formed_closed_ex_aux phi1 (S n')
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
x ∉ free_evars phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
well_formed_closed_ex_aux phi2 (S n')
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
x ∉ free_evars phi1
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_app phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
well_formed_closed_ex_aux phi1 (S n')
all: auto; apply andb_true_iff in H1; apply H1.
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n (evar_open n x phi1) =
phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n (evar_open n x phi2) =
phi2 n': nat H0: x ∉ free_evars (patt_imp phi1 phi2) H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n')
patt_imp
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H0: x ∉ free_evars (patt_imp phi1 phi2) H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n')
patt_imp
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') H0: (x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 |
patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1)
∧ x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 |
patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
patt_imp
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
patt_imp
(evar_quantify x n' phi1^[evar:n'↦patt_free_evar x])
(evar_quantify x n' phi2^[evar:n'↦patt_free_evar x]) =
patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
patt_imp phi1 phi2 = patt_imp phi1 phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
x ∉ free_evars phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
well_formed_closed_ex_aux phi2 (S n')
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
x ∉ free_evars phi1
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
well_formed_closed_ex_aux phi1 (S n')
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
x ∉ free_evars phi2
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
well_formed_closed_ex_aux phi2 (S n')
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
x ∉ free_evars phi1
Σ: Signature x: evar phi1, phi2: Pattern IHphi1: ∀n : nat,
x ∉ free_evars phi1
→ well_formed_closed_ex_aux phi1 (S n)
→ evar_quantify x n
phi1^[evar:n↦patt_free_evar x] = phi1 IHphi2: ∀n : nat,
x ∉ free_evars phi2
→ well_formed_closed_ex_aux phi2 (S n)
→ evar_quantify x n
phi2^[evar:n↦patt_free_evar x] = phi2 n': nat H1: well_formed_closed_ex_aux
(patt_imp phi1 phi2) (S n') E1: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi1 E2: x
∉ (fix free_evars (phi : Pattern) : EVarSet :=
match phi with
| patt_free_evar x => {[x]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_evars phi1 ∪ free_evars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_evars phi0
| _ => ∅
end) phi2
well_formed_closed_ex_aux phi1 (S n')
all: auto; apply andb_true_iff in H1; apply H1.
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n (evar_open n x phi) =
phi n': nat H0: x ∉ free_evars (patt_exists phi) H1: well_formed_closed_ex_aux
(patt_exists phi) (S n')
patt_exists
(evar_quantify x (S n')
phi^[evar:S n'↦patt_free_evar x]) =
patt_exists phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n (evar_open n x phi) =
phi n': nat H0: x ∉ free_evars phi H1: well_formed_closed_ex_aux
(patt_exists phi) (S n')
patt_exists
(evar_quantify x (S n')
phi^[evar:S n'↦patt_free_evar x]) =
patt_exists phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n
phi^[evar:n↦patt_free_evar x] = phi n': nat H0: x ∉ free_evars phi H1: well_formed_closed_ex_aux
(patt_exists phi) (S n')
patt_exists
(evar_quantify x (S n')
phi^[evar:S n'↦patt_free_evar x]) =
patt_exists phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n
phi^[evar:n↦patt_free_evar x] = phi n': nat H0: x ∉ free_evars phi H1: well_formed_closed_ex_aux
(patt_exists phi) (S n')
patt_exists phi = patt_exists phi
reflexivity.
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n (evar_open n x phi) =
phi n': nat H0: x ∉ free_evars (patt_mu phi) H1: well_formed_closed_ex_aux (patt_mu phi) (S n')
patt_mu
(evar_quantify x n' phi^[evar:n'↦patt_free_evar x]) =
patt_mu phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n (evar_open n x phi) =
phi n': nat H0: x ∉ free_evars phi H1: well_formed_closed_ex_aux (patt_mu phi) (S n')
patt_mu
(evar_quantify x n' phi^[evar:n'↦patt_free_evar x]) =
patt_mu phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n
phi^[evar:n↦patt_free_evar x] = phi n': nat H0: x ∉ free_evars phi H1: well_formed_closed_ex_aux (patt_mu phi) (S n')
patt_mu
(evar_quantify x n' phi^[evar:n'↦patt_free_evar x]) =
patt_mu phi
Σ: Signature x: evar phi: Pattern IHphi: ∀n : nat,
x ∉ free_evars phi
→ well_formed_closed_ex_aux phi (S n)
→ evar_quantify x n
phi^[evar:n↦patt_free_evar x] = phi n': nat H0: x ∉ free_evars phi H1: well_formed_closed_ex_aux (patt_mu phi) (S n')
patt_mu phi = patt_mu phi
reflexivity.Qed.
Σ: Signature X: svar n: nat phi: Pattern
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n (svar_open n X phi) = phi
Σ: Signature X: svar n: nat phi: Pattern
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n (svar_open n X phi) = phi
Σ: Signature X: svar phi: Pattern
∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n (svar_open n X phi) = phi
Σ: Signature X, x: svar n': nat H0: X ∉ free_svars (patt_free_svar x) H1: well_formed_closed_mu_aux (patt_free_svar x)
(S n')
(if decide (X = x)
then patt_bound_svar n'
else patt_free_svar x) = patt_free_svar x
Σ: Signature X: svar n: db_index n': nat H0: X ∉ free_svars (patt_bound_svar n) H1: well_formed_closed_mu_aux (patt_bound_svar n)
(S n')
svar_quantify X n'
(svar_open n' X (patt_bound_svar n)) =
patt_bound_svar n
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n (svar_open n X phi1) =
phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n (svar_open n X phi2) =
phi2 n': nat H0: X ∉ free_svars (patt_app phi1 phi2) H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n')
patt_app
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n (svar_open n X phi1) =
phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n (svar_open n X phi2) =
phi2 n': nat H0: X ∉ free_svars (patt_imp phi1 phi2) H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n')
patt_imp
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_imp phi1 phi2
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n (svar_open n X phi) =
phi n': nat H0: X ∉ free_svars (patt_exists phi) H1: well_formed_closed_mu_aux
(patt_exists phi) (S n')
patt_exists
(svar_quantify X n' phi^[svar:n'↦patt_free_svar X]) =
patt_exists phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n (svar_open n X phi) =
phi n': nat H0: X ∉ free_svars (patt_mu phi) H1: well_formed_closed_mu_aux (patt_mu phi) (S n')
patt_mu
(svar_quantify X (S n')
phi^[svar:S n'↦patt_free_svar X]) =
patt_mu phi
Σ: Signature X, x: svar n': nat H0: X ∉ free_svars (patt_free_svar x) H1: well_formed_closed_mu_aux (patt_free_svar x)
(S n')
(if decide (X = x)
then patt_bound_svar n'
else patt_free_svar x) = patt_free_svar x
Σ: Signature X, x: svar n': nat H0: X ∉ free_svars (patt_free_svar x) H1: well_formed_closed_mu_aux (patt_free_svar x)
(S n') e: X = x
patt_bound_svar n' = patt_free_svar x
Σ: Signature X, x: svar n': nat H0: X ∉ free_svars (patt_free_svar x) H1: well_formed_closed_mu_aux (patt_free_svar x)
(S n') n: X ≠ x
patt_free_svar x = patt_free_svar x
Σ: Signature X, x: svar n': nat H0: X ∉ free_svars (patt_free_svar x) H1: well_formed_closed_mu_aux (patt_free_svar x)
(S n') e: X = x
patt_bound_svar n' = patt_free_svar x
Σ: Signature x: svar n': nat H0: x ∉ free_svars (patt_free_svar x) H1: well_formed_closed_mu_aux (patt_free_svar x)
(S n')
patt_bound_svar n' = patt_free_svar x
Σ: Signature x: svar n': nat H0: x ∉ {[x]} H1: well_formed_closed_mu_aux (patt_free_svar x)
(S n')
patt_bound_svar n' = patt_free_svar x
Σ: Signature x: svar n': nat H0: x ≠ x H1: well_formed_closed_mu_aux (patt_free_svar x)
(S n')
patt_bound_svar n' = patt_free_svar x
congruence.
Σ: Signature X, x: svar n': nat H0: X ∉ free_svars (patt_free_svar x) H1: well_formed_closed_mu_aux (patt_free_svar x)
(S n') n: X ≠ x
patt_free_svar x = patt_free_svar x
reflexivity.
Σ: Signature X: svar n: db_index n': nat H0: X ∉ free_svars (patt_bound_svar n) H1: well_formed_closed_mu_aux (patt_bound_svar n)
(S n')
svar_quantify X n'
(svar_open n' X (patt_bound_svar n)) =
patt_bound_svar n
Σ: Signature X: svar n: db_index n': nat H0: X ∉ ∅ H1: if decide (n < S n') then true else false
svar_quantify X n'
(svar_open n' X (patt_bound_svar n)) =
patt_bound_svar n
Σ: Signature X: svar n: db_index n': nat H0: X ∉ ∅ H1: if decide (n < S n') then true else false
(fix svar_quantify
(X : svar) (level : db_index) (p : Pattern) {struct
p} : Pattern :=
match p with
| patt_free_evar x' => patt_free_evar x'
| patt_free_svar X' =>
if decide (X = X')
then patt_bound_svar level
else patt_free_svar X'
| patt_bound_evar x' => patt_bound_evar x'
| patt_bound_svar X0 => patt_bound_svar X0
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app (svar_quantify X level ls)
(svar_quantify X level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp (svar_quantify X level ls)
(svar_quantify X level rs)
| patt_exists p' =>
patt_exists (svar_quantify X level p')
| patt_mu p' =>
patt_mu (svar_quantify X (S level) p')
end) X n'
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = patt_bound_svar n
Σ: Signature X: svar n: db_index n': nat H0: X ∉ ∅ l: n < S n' H: decide (n < S n') = left l H1: true g: n > n' H2: compare_nat n n' = Nat_greater n n' g
patt_bound_svar (Nat.pred n) = patt_bound_svar n
lia.
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n (svar_open n X phi1) =
phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n (svar_open n X phi2) =
phi2 n': nat H0: X ∉ free_svars (patt_app phi1 phi2) H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n')
patt_app
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H0: X ∉ free_svars (patt_app phi1 phi2) H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n')
patt_app
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') H0: (X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 |
patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1)
∧ X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 |
patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
patt_app
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
patt_app
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
patt_app phi1 phi2 = patt_app phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
X ∉ free_svars phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
well_formed_closed_mu_aux phi2 (S n')
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
X ∉ free_svars phi1
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
well_formed_closed_mu_aux phi1 (S n')
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
X ∉ free_svars phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
well_formed_closed_mu_aux phi2 (S n')
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
X ∉ free_svars phi1
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_app phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
well_formed_closed_mu_aux phi1 (S n')
all: auto; apply andb_true_iff in H1; apply H1.
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n (svar_open n X phi1) =
phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n (svar_open n X phi2) =
phi2 n': nat H0: X ∉ free_svars (patt_imp phi1 phi2) H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n')
patt_imp
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H0: X ∉ free_svars (patt_imp phi1 phi2) H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n')
patt_imp
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') H0: (X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 |
patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1)
∧ X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 |
patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
patt_imp
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
patt_imp
(svar_quantify X n' phi1^[svar:n'↦patt_free_svar X])
(svar_quantify X n' phi2^[svar:n'↦patt_free_svar X]) =
patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
patt_imp phi1 phi2 = patt_imp phi1 phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
X ∉ free_svars phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
well_formed_closed_mu_aux phi2 (S n')
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
X ∉ free_svars phi1
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
well_formed_closed_mu_aux phi1 (S n')
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
X ∉ free_svars phi2
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
well_formed_closed_mu_aux phi2 (S n')
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
X ∉ free_svars phi1
Σ: Signature X: svar phi1, phi2: Pattern IHphi1: ∀n : nat,
X ∉ free_svars phi1
→ well_formed_closed_mu_aux phi1 (S n)
→ svar_quantify X n
phi1^[svar:n↦patt_free_svar X] = phi1 IHphi2: ∀n : nat,
X ∉ free_svars phi2
→ well_formed_closed_mu_aux phi2 (S n)
→ svar_quantify X n
phi2^[svar:n↦patt_free_svar X] = phi2 n': nat H1: well_formed_closed_mu_aux
(patt_imp phi1 phi2) (S n') E1: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi1 E2: X
∉ (fix free_svars (phi : Pattern) : SVarSet :=
match phi with
| patt_free_svar X => {[X]}
| patt_app phi1 phi2 | patt_imp phi1 phi2 =>
free_svars phi1 ∪ free_svars phi2
| patt_exists phi0 | patt_mu phi0 =>
free_svars phi0
| _ => ∅
end) phi2
well_formed_closed_mu_aux phi1 (S n')
all: auto; apply andb_true_iff in H1; apply H1.
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n (svar_open n X phi) =
phi n': nat H0: X ∉ free_svars (patt_exists phi) H1: well_formed_closed_mu_aux
(patt_exists phi) (S n')
patt_exists
(svar_quantify X n' phi^[svar:n'↦patt_free_svar X]) =
patt_exists phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n (svar_open n X phi) =
phi n': nat H0: X ∉ free_svars phi H1: well_formed_closed_mu_aux
(patt_exists phi) (S n')
patt_exists
(svar_quantify X n' phi^[svar:n'↦patt_free_svar X]) =
patt_exists phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n
phi^[svar:n↦patt_free_svar X] = phi n': nat H0: X ∉ free_svars phi H1: well_formed_closed_mu_aux
(patt_exists phi) (S n')
patt_exists
(svar_quantify X n' phi^[svar:n'↦patt_free_svar X]) =
patt_exists phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n
phi^[svar:n↦patt_free_svar X] = phi n': nat H0: X ∉ free_svars phi H1: well_formed_closed_mu_aux
(patt_exists phi) (S n')
patt_exists phi = patt_exists phi
reflexivity.
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n (svar_open n X phi) =
phi n': nat H0: X ∉ free_svars (patt_mu phi) H1: well_formed_closed_mu_aux (patt_mu phi) (S n')
patt_mu
(svar_quantify X (S n')
phi^[svar:S n'↦patt_free_svar X]) = patt_mu phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n (svar_open n X phi) =
phi n': nat H0: X ∉ free_svars phi H1: well_formed_closed_mu_aux (patt_mu phi) (S n')
patt_mu
(svar_quantify X (S n')
phi^[svar:S n'↦patt_free_svar X]) = patt_mu phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n
phi^[svar:n↦patt_free_svar X] = phi n': nat H0: X ∉ free_svars phi H1: well_formed_closed_mu_aux (patt_mu phi) (S n')
patt_mu
(svar_quantify X (S n')
phi^[svar:S n'↦patt_free_svar X]) = patt_mu phi
Σ: Signature X: svar phi: Pattern IHphi: ∀n : nat,
X ∉ free_svars phi
→ well_formed_closed_mu_aux phi (S n)
→ svar_quantify X n
phi^[svar:n↦patt_free_svar X] = phi n': nat H0: X ∉ free_svars phi H1: well_formed_closed_mu_aux (patt_mu phi) (S n')
patt_mu phi = patt_mu phi
reflexivity.Qed.
Σ: Signature φ: Pattern
∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ) =
evar_quantify x n φ
Σ: Signature φ: Pattern
∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ) =
evar_quantify x n φ
Σ: Signature x, x': evar n': db_index
evar_quantify x' n'
(if decide (x' = x)
then patt_bound_evar n'
else patt_free_evar x) =
(if decide (x' = x)
then patt_bound_evar n'
else patt_free_evar x)
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ1) =
evar_quantify x n φ1 IHφ2: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ2) =
evar_quantify x n φ2 x': evar n': db_index
patt_app
(evar_quantify x' n' (evar_quantify x' n' φ1))
(evar_quantify x' n' (evar_quantify x' n' φ2)) =
patt_app (evar_quantify x' n' φ1)
(evar_quantify x' n' φ2)
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ1) =
evar_quantify x n φ1 IHφ2: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ2) =
evar_quantify x n φ2 x': evar n': db_index
patt_imp
(evar_quantify x' n' (evar_quantify x' n' φ1))
(evar_quantify x' n' (evar_quantify x' n' φ2)) =
patt_imp (evar_quantify x' n' φ1)
(evar_quantify x' n' φ2)
Σ: Signature φ: Pattern IHφ: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ) =
evar_quantify x n φ x': evar n': db_index
patt_exists
(evar_quantify x' (S n') (evar_quantify x' (S n') φ)) =
patt_exists (evar_quantify x' (S n') φ)
Σ: Signature φ: Pattern IHφ: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ) =
evar_quantify x n φ x': evar n': db_index
patt_mu (evar_quantify x' n' (evar_quantify x' n' φ)) =
patt_mu (evar_quantify x' n' φ)
Σ: Signature x, x': evar n': db_index
evar_quantify x' n'
(if decide (x' = x)
then patt_bound_evar n'
else patt_free_evar x) =
(if decide (x' = x)
then patt_bound_evar n'
else patt_free_evar x)
Σ: Signature x, x': evar n': db_index
(fix evar_quantify
(x : evar) (level : db_index) (p : Pattern) {struct
p} : Pattern :=
match p with
| patt_free_evar x' =>
if decide (x = x')
then patt_bound_evar level
else patt_free_evar x'
| patt_free_svar x' => patt_free_svar x'
| patt_bound_evar x' => patt_bound_evar x'
| patt_bound_svar X => patt_bound_svar X
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app (evar_quantify x level ls)
(evar_quantify x level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp (evar_quantify x level ls)
(evar_quantify x level rs)
| patt_exists p' =>
patt_exists (evar_quantify x (S level) p')
| patt_mu p' => patt_mu (evar_quantify x level p')
end) x' n'
(if decide (x' = x)
then patt_bound_evar n'
else patt_free_evar x) =
(if decide (x' = x)
then patt_bound_evar n'
else patt_free_evar x)
Σ: Signature x, x': evar n': db_index n: x' ≠ x e: x' = x H0: decide (x' = x) = left e H: left e = right n
patt_bound_evar n' = patt_free_evar x
contradiction.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ1) =
evar_quantify x n φ1 IHφ2: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ2) =
evar_quantify x n φ2 x': evar n': db_index
patt_app
(evar_quantify x' n' (evar_quantify x' n' φ1))
(evar_quantify x' n' (evar_quantify x' n' φ2)) =
patt_app (evar_quantify x' n' φ1)
(evar_quantify x' n' φ2)
nowrewrite -> IHφ1, -> IHφ2.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ1) =
evar_quantify x n φ1 IHφ2: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ2) =
evar_quantify x n φ2 x': evar n': db_index
patt_imp
(evar_quantify x' n' (evar_quantify x' n' φ1))
(evar_quantify x' n' (evar_quantify x' n' φ2)) =
patt_imp (evar_quantify x' n' φ1)
(evar_quantify x' n' φ2)
nowrewrite -> IHφ1, -> IHφ2.
Σ: Signature φ: Pattern IHφ: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ) = evar_quantify x n φ x': evar n': db_index
patt_exists
(evar_quantify x' (S n') (evar_quantify x' (S n') φ)) =
patt_exists (evar_quantify x' (S n') φ)
nowrewrite IHφ.
Σ: Signature φ: Pattern IHφ: ∀ (x : evar) (n : db_index),
evar_quantify x n (evar_quantify x n φ) = evar_quantify x n φ x': evar n': db_index
patt_mu (evar_quantify x' n' (evar_quantify x' n' φ)) =
patt_mu (evar_quantify x' n' φ)
nowrewrite IHφ.Qed.
Σ: Signature φ: Pattern
∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ) =
svar_quantify X n φ
Σ: Signature φ: Pattern
∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ) =
svar_quantify X n φ
Σ: Signature x, x': svar n': db_index
svar_quantify x' n'
(if decide (x' = x)
then patt_bound_svar n'
else patt_free_svar x) =
(if decide (x' = x)
then patt_bound_svar n'
else patt_free_svar x)
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ1) =
svar_quantify X n φ1 IHφ2: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ2) =
svar_quantify X n φ2 x': svar n': db_index
patt_app
(svar_quantify x' n' (svar_quantify x' n' φ1))
(svar_quantify x' n' (svar_quantify x' n' φ2)) =
patt_app (svar_quantify x' n' φ1)
(svar_quantify x' n' φ2)
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ1) =
svar_quantify X n φ1 IHφ2: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ2) =
svar_quantify X n φ2 x': svar n': db_index
patt_imp
(svar_quantify x' n' (svar_quantify x' n' φ1))
(svar_quantify x' n' (svar_quantify x' n' φ2)) =
patt_imp (svar_quantify x' n' φ1)
(svar_quantify x' n' φ2)
Σ: Signature φ: Pattern IHφ: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ) =
svar_quantify X n φ x': svar n': db_index
patt_exists
(svar_quantify x' n' (svar_quantify x' n' φ)) =
patt_exists (svar_quantify x' n' φ)
Σ: Signature φ: Pattern IHφ: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ) =
svar_quantify X n φ x': svar n': db_index
patt_mu
(svar_quantify x' (S n') (svar_quantify x' (S n') φ)) =
patt_mu (svar_quantify x' (S n') φ)
Σ: Signature x, x': svar n': db_index
svar_quantify x' n'
(if decide (x' = x)
then patt_bound_svar n'
else patt_free_svar x) =
(if decide (x' = x)
then patt_bound_svar n'
else patt_free_svar x)
Σ: Signature x, x': svar n': db_index
(fix svar_quantify
(X : svar) (level : db_index) (p : Pattern) {struct
p} : Pattern :=
match p with
| patt_free_evar x' => patt_free_evar x'
| patt_free_svar X' =>
if decide (X = X')
then patt_bound_svar level
else patt_free_svar X'
| patt_bound_evar x' => patt_bound_evar x'
| patt_bound_svar X0 => patt_bound_svar X0
| patt_sym s => patt_sym s
| patt_app ls rs =>
patt_app (svar_quantify X level ls)
(svar_quantify X level rs)
| patt_bott => patt_bott
| patt_imp ls rs =>
patt_imp (svar_quantify X level ls)
(svar_quantify X level rs)
| patt_exists p' =>
patt_exists (svar_quantify X level p')
| patt_mu p' =>
patt_mu (svar_quantify X (S level) p')
end) x' n'
(if decide (x' = x)
then patt_bound_svar n'
else patt_free_svar x) =
(if decide (x' = x)
then patt_bound_svar n'
else patt_free_svar x)
Σ: Signature x, x': svar n': db_index n: x' ≠ x e: x' = x H0: decide (x' = x) = left e H: left e = right n
patt_bound_svar n' = patt_free_svar x
contradiction.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ1) =
svar_quantify X n φ1 IHφ2: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ2) =
svar_quantify X n φ2 x': svar n': db_index
patt_app
(svar_quantify x' n' (svar_quantify x' n' φ1))
(svar_quantify x' n' (svar_quantify x' n' φ2)) =
patt_app (svar_quantify x' n' φ1)
(svar_quantify x' n' φ2)
nowrewrite -> IHφ1, -> IHφ2.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ1) =
svar_quantify X n φ1 IHφ2: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ2) =
svar_quantify X n φ2 x': svar n': db_index
patt_imp
(svar_quantify x' n' (svar_quantify x' n' φ1))
(svar_quantify x' n' (svar_quantify x' n' φ2)) =
patt_imp (svar_quantify x' n' φ1)
(svar_quantify x' n' φ2)
nowrewrite -> IHφ1, -> IHφ2.
Σ: Signature φ: Pattern IHφ: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ) = svar_quantify X n φ x': svar n': db_index
patt_exists
(svar_quantify x' n' (svar_quantify x' n' φ)) =
patt_exists (svar_quantify x' n' φ)
nowrewrite IHφ.
Σ: Signature φ: Pattern IHφ: ∀ (X : svar) (n : db_index),
svar_quantify X n (svar_quantify X n φ) = svar_quantify X n φ x': svar n': db_index
patt_mu
(svar_quantify x' (S n') (svar_quantify x' (S n') φ)) =
patt_mu (svar_quantify x' (S n') φ)
nowrewrite IHφ.Qed.
Σ: Signature φ: Pattern
∀ (ψ : Pattern) (nm : nat),
m ≥ n
→ well_formed_closed_ex_aux φ n → φ^[evar:m↦ψ] = φ
Σ: Signature φ: Pattern
∀ (ψ : Pattern) (nm : nat),
m ≥ n
→ well_formed_closed_ex_aux φ n → φ^[evar:m↦ψ] = φ
Σ: Signature n: db_index ψ: Pattern n', m': nat H: m' ≥ n' H0: well_formed_closed_ex_aux (patt_bound_evar n) n'
match compare_nat n m' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => ψ
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end = patt_bound_evar n
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (nm : nat),
m ≥ n
→ well_formed_closed_ex_aux φ1 n
→ φ1^[evar:m↦ψ] = φ1 IHφ2: ∀ (ψ : Pattern) (nm : nat),
m ≥ n
→ well_formed_closed_ex_aux φ2 n
→ φ2^[evar:m↦ψ] = φ2 ψ: Pattern n', m': nat H: m' ≥ n' H0: well_formed_closed_ex_aux (patt_app φ1 φ2) n'
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi1
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end^[evar:m0↦psi2] =
match compare_nat n (S m0) with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end^[evar:n0↦psi1]
Σ: Signature n: db_index psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_ex_aux psi1 0 Hwf2: well_formed_closed_ex_aux psi2 0 l: n < n0 H: compare_nat n n0 = Nat_less n n0 l l0: n < S m0 H0: compare_nat n (S m0) = Nat_less n (S m0) l0
match compare_nat n m0 with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end =
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi1
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end
Σ: Signature psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_ex_aux psi1 0 Hwf2: well_formed_closed_ex_aux psi2 0 l: S m0 < n0 H: compare_nat (S m0) n0 = Nat_less (S m0) n0 l H0: compare_nat (S m0) (S m0) =
Nat_equal (S m0) (S m0) (erefl (S m0))
match compare_nat (S m0) m0 with
| Nat_less _ _ _ => patt_bound_evar (S m0)
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred (S m0))
end = psi2^[evar:n0↦psi1]
Σ: Signature n: db_index psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_ex_aux psi1 0 Hwf2: well_formed_closed_ex_aux psi2 0 l: n < n0 H: compare_nat n n0 = Nat_less n n0 l g: n > S m0 H0: compare_nat n (S m0) = Nat_greater n (S m0) g
match compare_nat n m0 with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end =
match compare_nat (Nat.pred n) n0 with
| Nat_less _ _ _ => patt_bound_evar (Nat.pred n)
| Nat_equal _ _ _ => psi1
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred (Nat.pred n))
end
Σ: Signature n: db_index psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_ex_aux psi1 0 Hwf2: well_formed_closed_ex_aux psi2 0 g: n > n0 H: compare_nat n n0 = Nat_greater n n0 g l: n < S m0 H0: compare_nat n (S m0) = Nat_less n (S m0) l
match compare_nat (Nat.pred n) m0 with
| Nat_less _ _ _ => patt_bound_evar (Nat.pred n)
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred (Nat.pred n))
end =
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => psi1
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end
Σ: Signature psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_ex_aux psi1 0 Hwf2: well_formed_closed_ex_aux psi2 0 g: S m0 > n0 H: compare_nat (S m0) n0 = Nat_greater (S m0) n0 g H0: compare_nat (S m0) (S m0) =
Nat_equal (S m0) (S m0) (erefl (S m0))
match compare_nat (Nat.pred (S m0)) m0 with
| Nat_less _ _ _ => patt_bound_evar (Nat.pred (S m0))
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred (Nat.pred (S m0)))
end = psi2^[evar:n0↦psi1]
Σ: Signature n: db_index psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_ex_aux psi1 0 Hwf2: well_formed_closed_ex_aux psi2 0 g: n > n0 H: compare_nat n n0 = Nat_greater n n0 g g0: n > S m0 H0: compare_nat n (S m0) = Nat_greater n (S m0) g0
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi1
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end^[svar:m0↦psi2] =
match compare_nat n (S m0) with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end^[svar:n0↦psi1]
Σ: Signature n: db_index psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_mu_aux psi1 0 Hwf2: well_formed_closed_mu_aux psi2 0 l: n < n0 H: compare_nat n n0 = Nat_less n n0 l l0: n < S m0 H0: compare_nat n (S m0) = Nat_less n (S m0) l0
match compare_nat n m0 with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end =
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi1
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end
Σ: Signature psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_mu_aux psi1 0 Hwf2: well_formed_closed_mu_aux psi2 0 l: S m0 < n0 H: compare_nat (S m0) n0 = Nat_less (S m0) n0 l H0: compare_nat (S m0) (S m0) =
Nat_equal (S m0) (S m0) (erefl (S m0))
match compare_nat (S m0) m0 with
| Nat_less _ _ _ => patt_bound_svar (S m0)
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ =>
patt_bound_svar (Nat.pred (S m0))
end = psi2^[svar:n0↦psi1]
Σ: Signature n: db_index psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_mu_aux psi1 0 Hwf2: well_formed_closed_mu_aux psi2 0 l: n < n0 H: compare_nat n n0 = Nat_less n n0 l g: n > S m0 H0: compare_nat n (S m0) = Nat_greater n (S m0) g
match compare_nat n m0 with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end =
match compare_nat (Nat.pred n) n0 with
| Nat_less _ _ _ => patt_bound_svar (Nat.pred n)
| Nat_equal _ _ _ => psi1
| Nat_greater _ _ _ =>
patt_bound_svar (Nat.pred (Nat.pred n))
end
Σ: Signature n: db_index psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_mu_aux psi1 0 Hwf2: well_formed_closed_mu_aux psi2 0 g: n > n0 H: compare_nat n n0 = Nat_greater n n0 g l: n < S m0 H0: compare_nat n (S m0) = Nat_less n (S m0) l
match compare_nat (Nat.pred n) m0 with
| Nat_less _ _ _ => patt_bound_svar (Nat.pred n)
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ =>
patt_bound_svar (Nat.pred (Nat.pred n))
end =
match compare_nat n n0 with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => psi1
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end
Σ: Signature psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_mu_aux psi1 0 Hwf2: well_formed_closed_mu_aux psi2 0 g: S m0 > n0 H: compare_nat (S m0) n0 = Nat_greater (S m0) n0 g H0: compare_nat (S m0) (S m0) =
Nat_equal (S m0) (S m0) (erefl (S m0))
match compare_nat (Nat.pred (S m0)) m0 with
| Nat_less _ _ _ => patt_bound_svar (Nat.pred (S m0))
| Nat_equal _ _ _ => psi2
| Nat_greater _ _ _ =>
patt_bound_svar (Nat.pred (Nat.pred (S m0)))
end = psi2^[svar:n0↦psi1]
Σ: Signature n: db_index psi1, psi2: Pattern n0, m0: nat NEQ: n0 < m0 Hwf1: well_formed_closed_mu_aux psi1 0 Hwf2: well_formed_closed_mu_aux psi2 0 g: n > n0 H: compare_nat n n0 = Nat_greater n n0 g g0: n > S m0 H0: compare_nat n (S m0) = Nat_greater n (S m0) g0
Σ: Signature n, dbi: db_index X: svar H: if decide (n = dbi) then false else true H0: false = false
svar_has_positive_occurrence X
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = false
svar_has_negative_occurrence X
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = false
(fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X
phi1^[svar:dbi↦patt_free_svar X]
|| svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar X] = false
Σ: Signature n, dbi: db_index X: svar H: if decide (n = dbi) then false else true H0: false = false
svar_has_positive_occurrence X
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = false
svar_has_negative_occurrence X
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = false
no_negative_occurrence_db_b
(S dbi1) phi^[svar:S dbi2↦
patt_free_svar X]
Σ: Signature n, dbi1, dbi2: db_index X: svar Hneq: dbi1 < dbi2 H: if decide (n = dbi1) then false else true
no_positive_occurrence_db_b dbi1
match compare_nat n dbi2 with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end
Σ: Signature n, dbi1, dbi2: db_index X: svar Hneq: dbi1 < dbi2 n0: n ≠ dbi1 H0: decide (n = dbi1) = right n0 H: true g: n > dbi2 H1: compare_nat n dbi2 = Nat_greater n dbi2 g e: Nat.pred n = dbi1 H2: decide (Nat.pred n = dbi1) = left e
∀ (phi : Pattern) (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi = false
→ svar_has_negative_occurrence X
(svar_open dbi Y phi) = false)
∧ (svar_has_positive_occurrence X phi = false
→ svar_has_positive_occurrence X
(svar_open dbi Y phi) = false)
Σ: Signature
∀ (phi : Pattern) (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi = false
→ svar_has_negative_occurrence X
(svar_open dbi Y phi) = false)
∧ (svar_has_positive_occurrence X phi = false
→ svar_has_positive_occurrence X
(svar_open dbi Y phi) = false)
Σ: Signature
∀ (phi : Pattern) (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi = false
→ svar_has_negative_occurrence X
phi^[svar:dbi↦patt_free_svar Y] = false)
∧ (svar_has_positive_occurrence X phi = false
→ svar_has_positive_occurrence X
phi^[svar:dbi↦patt_free_svar Y] = false)
Σ: Signature n: db_index X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_negative_occurrence X
(patt_bound_svar n) = false
svar_has_negative_occurrence X
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar Y
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = false
Σ: Signature n: db_index X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_positive_occurrence X
(patt_bound_svar n) = false
svar_has_positive_occurrence X
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar Y
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_negative_occurrence X
(patt_app phi1 phi2) = false
svar_has_negative_occurrence X
(patt_app phi1^[svar:dbi↦
patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_positive_occurrence X
(patt_app phi1 phi2) = false
svar_has_positive_occurrence X
(patt_app phi1^[svar:dbi↦
patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_negative_occurrence X
(patt_imp phi1 phi2) = false
svar_has_negative_occurrence X
(patt_imp phi1^[svar:dbi↦
patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_positive_occurrence X
(patt_imp phi1 phi2) = false
svar_has_positive_occurrence X
(patt_imp phi1^[svar:dbi↦
patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature n: db_index X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_negative_occurrence X
(patt_bound_svar n) = false
svar_has_negative_occurrence X
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar Y
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = false
now case_match.
Σ: Signature n: db_index X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_positive_occurrence X
(patt_bound_svar n) = false
svar_has_positive_occurrence X
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar Y
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = false
Σ: Signature n: db_index X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_positive_occurrence X
(patt_bound_svar n) = false e: n = dbi H: compare_nat n dbi = Nat_equal n dbi e
svar_has_positive_occurrence X (patt_free_svar Y) =
false
Σ: Signature n: db_index X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_positive_occurrence X
(patt_bound_svar n) = false e: n = dbi H: compare_nat n dbi = Nat_equal n dbi e
(if decide (X = Y) then true else false) = false
Σ: Signature n: db_index X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_positive_occurrence X
(patt_bound_svar n) = false e: n = dbi H: compare_nat n dbi = Nat_equal n dbi e e0: X = Y H0: decide (X = Y) = left e0
true = false
congruence.
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_negative_occurrence X
(patt_app phi1 phi2) = false
svar_has_negative_occurrence X
(patt_app phi1^[svar:dbi↦patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi2 = false
svar_has_negative_occurrence X
(patt_app phi1^[svar:dbi↦patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi2 = false
svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y]
|| svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] = false
nowerewrite -> (proj1 (IHphi1 X Y dbi XneY)), -> (proj1 (IHphi2 X Y dbi XneY)).
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_positive_occurrence X
(patt_app phi1 phi2) = false
svar_has_positive_occurrence X
(patt_app phi1^[svar:dbi↦patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi2 = false
svar_has_positive_occurrence X
(patt_app phi1^[svar:dbi↦patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi2 = false
svar_has_positive_occurrence X
phi1^[svar:dbi↦patt_free_svar Y]
|| svar_has_positive_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] = false
nowerewrite -> (proj2 (IHphi1 X Y dbi XneY)), -> (proj2 (IHphi2 X Y dbi XneY)).
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_negative_occurrence X
(patt_imp phi1 phi2) = false
svar_has_negative_occurrence X
(patt_imp phi1^[svar:dbi↦patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi2 = false
svar_has_negative_occurrence X
(patt_imp phi1^[svar:dbi↦patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi2 = false
(fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X
phi1^[svar:dbi↦patt_free_svar Y]
|| svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi2 = false
svar_has_positive_occurrence X
phi1^[svar:dbi↦patt_free_svar Y]
|| svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] = false
nowerewrite -> (proj2 (IHphi1 X Y dbi XneY)), -> (proj1 (IHphi2 X Y dbi XneY)).
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y Hneg: svar_has_positive_occurrence X
(patt_imp phi1 phi2) = false
svar_has_positive_occurrence X
(patt_imp phi1^[svar:dbi↦patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi2 = false
svar_has_positive_occurrence X
(patt_imp phi1^[svar:dbi↦patt_free_svar Y]
phi2^[svar:dbi↦patt_free_svar Y]) = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi2 = false
(fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X
phi1^[svar:dbi↦patt_free_svar Y]
|| svar_has_positive_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] = false
Σ: Signature phi1, phi2: Pattern IHphi1: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi1 =
false
→ svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi1 =
false
→ svar_has_positive_occurrence X
phi1^[svar:dbi↦
patt_free_svar Y] = false) IHphi2: ∀ (XY : svar) (dbi : db_index),
X ≠ Y
→ (svar_has_negative_occurrence X phi2 =
false
→ svar_has_negative_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] =
false)
∧ (svar_has_positive_occurrence X phi2 =
false
→ svar_has_positive_occurrence X
phi2^[svar:dbi↦
patt_free_svar Y] = false) X, Y: svar dbi: db_index XneY: X ≠ Y H1: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_negative_occurrence) X phi1 = false H2: (fix svar_has_positive_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_free_svar X' =>
if decide (X = X') then true else false
| patt_app ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_positive_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_positive_occurrence X ϕ'
| _ => false
endwith svar_has_negative_occurrence
(X : svar) (ϕ : Pattern) {struct ϕ} : bool :=
match ϕ with
| patt_app ϕ₁ ϕ₂ =>
svar_has_negative_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_imp ϕ₁ ϕ₂ =>
svar_has_positive_occurrence X ϕ₁
|| svar_has_negative_occurrence X ϕ₂
| patt_exists ϕ' | patt_mu ϕ' =>
svar_has_negative_occurrence X ϕ'
| _ => false
endfor
svar_has_positive_occurrence) X phi2 = false
svar_has_negative_occurrence X
phi1^[svar:dbi↦patt_free_svar Y]
|| svar_has_positive_occurrence X
phi2^[svar:dbi↦patt_free_svar Y] = false
nowerewrite -> (proj1 (IHphi1 X Y dbi XneY)), -> (proj2 (IHphi2 X Y dbi XneY)).Qed.
Σ: Signature n: db_index x': evar n': db_index ψ: Pattern y: evar H: x' ≠ y H0: well_formed ψ e: n = n' Heqc: compare_nat n n' = Nat_equal n n' e e0: y = x'
patt_free_evar x' = ψ
congruence.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (x : evar) (n : db_index)
(ψ : Pattern) (y : evar),
x ≠ y
→ well_formed ψ
→ evar_open n x φ1^[[evar:y↦ψ]] =
(evar_open n x φ1)^[[evar:y↦ψ]] IHφ2: ∀ (x : evar) (n : db_index)
(ψ : Pattern) (y : evar),
x ≠ y
→ well_formed ψ
→ evar_open n x φ2^[[evar:y↦ψ]] =
(evar_open n x φ2)^[[evar:y↦ψ]] x': evar n': db_index ψ: Pattern y: evar H: x' ≠ y H0: well_formed ψ
Σ: Signature x, x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_free_evar x) m H1: x' ∉ free_evars (patt_free_evar x)
patt_free_evar x =
(if decide (x' = x) then ψ else patt_free_evar x)
Σ: Signature x, x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_free_evar x) m H1: x' ∉ free_evars (patt_free_evar x) e: x' = x
patt_free_evar x = ψ
Σ: Signature x, x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_free_evar x) m H1: x' ∉ free_evars (patt_free_evar x) n: x' ≠ x
patt_free_evar x = patt_free_evar x
Σ: Signature x, x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_free_evar x) m H1: x' ∉ free_evars (patt_free_evar x) e: x' = x
patt_free_evar x = ψ
Σ: Signature x, x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_free_evar x) m H1: x' ∉ {[x]} e: x' = x
patt_free_evar x = ψ
Σ: Signature x, x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_free_evar x) m H1: x' ≠ x e: x' = x
patt_free_evar x = ψ
congruence.
Σ: Signature x, x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_free_evar x) m H1: x' ∉ free_evars (patt_free_evar x) n: x' ≠ x
patt_free_evar x = patt_free_evar x
reflexivity.
Σ: Signature n: db_index x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_bound_evar n) m H1: x' ∉ free_evars (patt_bound_evar n)
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => ψ
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end =
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x'
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end^[[evar:x'↦ψ]]
Σ: Signature n: db_index x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_bound_evar n) m H1: x' ∉ free_evars (patt_bound_evar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e
ψ = (patt_free_evar x')^[[evar:x'↦ψ]]
Σ: Signature n: db_index x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_bound_evar n) m H1: x' ∉ free_evars (patt_bound_evar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e
Σ: Signature n: db_index x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 l: n < m H4: decide (n < m) = left l H0: true H1: x' ∉ free_evars (patt_bound_evar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e n0: x' ≠ x' H3: decide (x' = x') = right n0
ψ = patt_free_evar x'
Σ: Signature n: db_index x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 n1: ¬ n < m H4: decide (n < m) = right n1 H0: false H1: x' ∉ free_evars (patt_bound_evar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e n0: x' ≠ x' H3: decide (x' = x') = right n0
ψ = patt_free_evar x'
Σ: Signature n: db_index x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 n1: ¬ n < m H4: decide (n < m) = right n1 H0: false H1: x' ∉ free_evars (patt_bound_evar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e n0: x' ≠ x' H3: decide (x' = x') = right n0
ψ = patt_free_evar x'
lia.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (x : evar) (mn : nat) (ψ : Pattern),
m > n
→ well_formed_closed_ex_aux ψ 0
→ well_formed_closed_ex_aux φ1 m
→ x ∉ free_evars φ1
→ φ1^[evar:n↦ψ] =
(evar_open n x φ1)^[[evar:x↦ψ]] IHφ2: ∀ (x : evar) (mn : nat) (ψ : Pattern),
m > n
→ well_formed_closed_ex_aux ψ 0
→ well_formed_closed_ex_aux φ2 m
→ x ∉ free_evars φ2
→ φ2^[evar:n↦ψ] =
(evar_open n x φ2)^[[evar:x↦ψ]] x': evar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_ex_aux ψ 0 H0: well_formed_closed_ex_aux (patt_app φ1 φ2) m H1: x' ∉ free_evars (patt_app φ1 φ2)
Σ: Signature x, x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_free_svar x) m H1: x' ∉ free_svars (patt_free_svar x)
patt_free_svar x =
(if decide (x' = x) then ψ else patt_free_svar x)
Σ: Signature x, x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_free_svar x) m H1: x' ∉ free_svars (patt_free_svar x) e: x' = x
patt_free_svar x = ψ
Σ: Signature x, x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_free_svar x) m H1: x' ∉ free_svars (patt_free_svar x) n: x' ≠ x
patt_free_svar x = patt_free_svar x
Σ: Signature x, x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_free_svar x) m H1: x' ∉ free_svars (patt_free_svar x) e: x' = x
patt_free_svar x = ψ
Σ: Signature x, x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_free_svar x) m H1: x' ∉ {[x]} e: x' = x
patt_free_svar x = ψ
Σ: Signature x, x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_free_svar x) m H1: x' ≠ x e: x' = x
patt_free_svar x = ψ
congruence.
Σ: Signature x, x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_free_svar x) m H1: x' ∉ free_svars (patt_free_svar x) n: x' ≠ x
patt_free_svar x = patt_free_svar x
reflexivity.
Σ: Signature n: db_index x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_bound_svar n) m H1: x' ∉ free_svars (patt_bound_svar n)
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => ψ
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end =
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar x'
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end^[[svar:x'↦ψ]]
Σ: Signature n: db_index x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_bound_svar n) m H1: x' ∉ free_svars (patt_bound_svar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e
ψ = (patt_free_svar x')^[[svar:x'↦ψ]]
Σ: Signature n: db_index x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_bound_svar n) m H1: x' ∉ free_svars (patt_bound_svar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e
Σ: Signature n: db_index x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 l: n < m H4: decide (n < m) = left l H0: true H1: x' ∉ free_svars (patt_bound_svar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e n0: x' ≠ x' H3: decide (x' = x') = right n0
ψ = patt_free_svar x'
Σ: Signature n: db_index x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 n1: ¬ n < m H4: decide (n < m) = right n1 H0: false H1: x' ∉ free_svars (patt_bound_svar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e n0: x' ≠ x' H3: decide (x' = x') = right n0
ψ = patt_free_svar x'
Σ: Signature n: db_index x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 n1: ¬ n < m H4: decide (n < m) = right n1 H0: false H1: x' ∉ free_svars (patt_bound_svar n) e: n = n' H2: compare_nat n n' = Nat_equal n n' e n0: x' ≠ x' H3: decide (x' = x') = right n0
ψ = patt_free_svar x'
lia.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (X : svar) (mn : nat) (ψ : Pattern),
m > n
→ well_formed_closed_mu_aux ψ 0
→ well_formed_closed_mu_aux φ1 m
→ X ∉ free_svars φ1
→ φ1^[svar:n↦ψ] =
(svar_open n X φ1)^[[svar:X↦ψ]] IHφ2: ∀ (X : svar) (mn : nat) (ψ : Pattern),
m > n
→ well_formed_closed_mu_aux ψ 0
→ well_formed_closed_mu_aux φ2 m
→ X ∉ free_svars φ2
→ φ2^[svar:n↦ψ] =
(svar_open n X φ2)^[[svar:X↦ψ]] x': svar m, n': nat ψ: Pattern H: m > n' WFψ: well_formed_closed_mu_aux ψ 0 H0: well_formed_closed_mu_aux (patt_app φ1 φ2) m H1: x' ∉ free_svars (patt_app φ1 φ2)
well_formed_closed_mu_aux
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => ψ
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end m = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ1 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ1^[evar:n↦ψ] m =
true IHφ2: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ2 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ2^[evar:n↦ψ] m =
true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux (patt_app φ1 φ2) m =
true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ1^[evar:n'↦ψ] m &&
well_formed_closed_mu_aux φ2^[evar:n'↦ψ] m = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ1 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ1^[evar:n↦ψ] m =
true IHφ2: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ2 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ2^[evar:n↦ψ] m =
true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux (patt_imp φ1 φ2) m =
true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ1^[evar:n'↦ψ] m &&
well_formed_closed_mu_aux φ2^[evar:n'↦ψ] m = true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ^[evar:n↦ψ] m =
true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux (patt_mu φ) m = true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ^[evar:n'↦ψ] (S m) = true
well_formed_closed_mu_aux
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => ψ
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end m = true
break_match_goal; simplin H0, H; simpl; auto.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ1 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ1^[evar:n↦ψ] m =
true IHφ2: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ2 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ2^[evar:n↦ψ] m =
true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux (patt_app φ1 φ2) m =
true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ1^[evar:n'↦ψ] m &&
well_formed_closed_mu_aux φ2^[evar:n'↦ψ] m = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ1 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ1^[evar:n↦ψ] m =
true IHφ2: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ2 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ2^[evar:n↦ψ] m =
true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux φ1 m &&
well_formed_closed_mu_aux φ2 m = true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ1^[evar:n'↦ψ] m &&
well_formed_closed_mu_aux φ2^[evar:n'↦ψ] m = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ1 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ1^[evar:n↦ψ] m =
true IHφ2: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ2 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ2^[evar:n↦ψ] m =
true ψ: Pattern n', m: db_index E1: well_formed_closed_mu_aux φ1 m = true E2: well_formed_closed_mu_aux φ2 m = true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ1^[evar:n'↦ψ] m &&
well_formed_closed_mu_aux φ2^[evar:n'↦ψ] m = true
erewrite IHφ1, IHφ2; auto.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ1 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ1^[evar:n↦ψ] m =
true IHφ2: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ2 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ2^[evar:n↦ψ] m =
true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux (patt_imp φ1 φ2) m =
true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ1^[evar:n'↦ψ] m &&
well_formed_closed_mu_aux φ2^[evar:n'↦ψ] m = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ1 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ1^[evar:n↦ψ] m =
true IHφ2: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ2 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ2^[evar:n↦ψ] m =
true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux φ1 m &&
well_formed_closed_mu_aux φ2 m = true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ1^[evar:n'↦ψ] m &&
well_formed_closed_mu_aux φ2^[evar:n'↦ψ] m = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ1 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ1^[evar:n↦ψ] m =
true IHφ2: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ2 m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ2^[evar:n↦ψ] m =
true ψ: Pattern n', m: db_index E1: well_formed_closed_mu_aux φ1 m = true E2: well_formed_closed_mu_aux φ2 m = true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ1^[evar:n'↦ψ] m &&
well_formed_closed_mu_aux φ2^[evar:n'↦ψ] m = true
erewrite IHφ1, IHφ2; auto.
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ^[evar:n↦ψ] m = true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux (patt_mu φ) m = true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ^[evar:n'↦ψ] (S m) = true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ^[evar:n↦ψ] m = true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux φ (S m) = true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux φ^[evar:n'↦ψ] (S m) = true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ^[evar:n↦ψ] m = true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux φ (S m) = true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux ψ (S m) = true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ^[evar:n↦ψ] m = true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux φ (S m) = true H0: well_formed_closed_mu_aux ψ m = true
?ind_svar1 ≤ S m
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ^[evar:n↦ψ] m = true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux φ (S m) = true H0: well_formed_closed_mu_aux ψ m = true
well_formed_closed_mu_aux ψ ?ind_svar1 = true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (nm : db_index),
well_formed_closed_mu_aux φ m = true
→ well_formed_closed_mu_aux ψ m = true
→ well_formed_closed_mu_aux φ^[evar:n↦ψ] m = true ψ: Pattern n', m: db_index H: well_formed_closed_mu_aux φ (S m) = true H0: well_formed_closed_mu_aux ψ m = true
m ≤ S m
lia.Qed.
Σ: Signature
∀ (φψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ^[evar:n↦ψ] n = true
Σ: Signature
∀ (φψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ^[evar:n↦ψ] n = true
well_formed_closed_ex_aux
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => ψ
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end n' = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ1 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ1^[evar:n↦ψ] n =
true IHφ2: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ2 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ2^[evar:n↦ψ] n =
true ψ: Pattern n': nat H: well_formed_closed_ex_aux (patt_app φ1 φ2) (S n') =
true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ1^[evar:n'↦ψ] n' &&
well_formed_closed_ex_aux φ2^[evar:n'↦ψ] n' = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ1 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ1^[evar:n↦ψ] n =
true IHφ2: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ2 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ2^[evar:n↦ψ] n =
true ψ: Pattern n': nat H: well_formed_closed_ex_aux (patt_imp φ1 φ2) (S n') =
true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ1^[evar:n'↦ψ] n' &&
well_formed_closed_ex_aux φ2^[evar:n'↦ψ] n' = true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ^[evar:n↦ψ] n =
true ψ: Pattern n': nat H: well_formed_closed_ex_aux (patt_exists φ) (S n') =
true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ^[evar:S n'↦ψ] (S n') =
true
well_formed_closed_ex_aux
match compare_nat n n' with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => ψ
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end n' = true
Σ: Signature n: db_index ψ: Pattern n': nat H: (if decide (n < S n') then true else false) = true H0: well_formed_closed_ex_aux ψ n' = true l: n < n' Heqc: compare_nat n n' = Nat_less n n' l
(if decide (n < n') then true else false) = true
Σ: Signature n: db_index ψ: Pattern n': nat H: (if decide (n < S n') then true else false) = true H0: well_formed_closed_ex_aux ψ n' = true g: n > n' Heqc: compare_nat n n' = Nat_greater n n' g
(if decide (Nat.pred n < n') then true else false) =
true
Σ: Signature n: db_index ψ: Pattern n': nat H: (if decide (n < S n') then true else false) = true H0: well_formed_closed_ex_aux ψ n' = true g: n > n' Heqc: compare_nat n n' = Nat_greater n n' g
(if decide (Nat.pred n < n') then true else false) =
true
do2 case_match; auto; lia.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ1 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ1^[evar:n↦ψ] n =
true IHφ2: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ2 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ2^[evar:n↦ψ] n =
true ψ: Pattern n': nat H: well_formed_closed_ex_aux (patt_app φ1 φ2) (S n') =
true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ1^[evar:n'↦ψ] n' &&
well_formed_closed_ex_aux φ2^[evar:n'↦ψ] n' = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ1 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ1^[evar:n↦ψ] n =
true IHφ2: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ2 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ2^[evar:n↦ψ] n =
true ψ: Pattern n': nat H: well_formed_closed_ex_aux φ1 (S n') &&
well_formed_closed_ex_aux φ2 (S n') = true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ1^[evar:n'↦ψ] n' &&
well_formed_closed_ex_aux φ2^[evar:n'↦ψ] n' = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ1 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ1^[evar:n↦ψ] n =
true IHφ2: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ2 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ2^[evar:n↦ψ] n =
true ψ: Pattern n': nat E1: well_formed_closed_ex_aux φ1 (S n') = true E2: well_formed_closed_ex_aux φ2 (S n') = true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ1^[evar:n'↦ψ] n' &&
well_formed_closed_ex_aux φ2^[evar:n'↦ψ] n' = true
erewrite IHφ1, IHφ2; auto.
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ1 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ1^[evar:n↦ψ] n =
true IHφ2: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ2 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ2^[evar:n↦ψ] n =
true ψ: Pattern n': nat H: well_formed_closed_ex_aux (patt_imp φ1 φ2) (S n') =
true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ1^[evar:n'↦ψ] n' &&
well_formed_closed_ex_aux φ2^[evar:n'↦ψ] n' = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ1 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ1^[evar:n↦ψ] n =
true IHφ2: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ2 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ2^[evar:n↦ψ] n =
true ψ: Pattern n': nat H: well_formed_closed_ex_aux φ1 (S n') &&
well_formed_closed_ex_aux φ2 (S n') = true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ1^[evar:n'↦ψ] n' &&
well_formed_closed_ex_aux φ2^[evar:n'↦ψ] n' = true
Σ: Signature φ1, φ2: Pattern IHφ1: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ1 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ1^[evar:n↦ψ] n =
true IHφ2: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ2 (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ2^[evar:n↦ψ] n =
true ψ: Pattern n': nat E1: well_formed_closed_ex_aux φ1 (S n') = true E2: well_formed_closed_ex_aux φ2 (S n') = true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ1^[evar:n'↦ψ] n' &&
well_formed_closed_ex_aux φ2^[evar:n'↦ψ] n' = true
erewrite IHφ1, IHφ2; auto.
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ^[evar:n↦ψ] n = true ψ: Pattern n': nat H: well_formed_closed_ex_aux (patt_exists φ) (S n') =
true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ^[evar:S n'↦ψ] (S n') =
true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ^[evar:n↦ψ] n = true ψ: Pattern n': nat H: well_formed_closed_ex_aux φ (S (S n')) = true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux φ^[evar:S n'↦ψ] (S n') =
true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ^[evar:n↦ψ] n = true ψ: Pattern n': nat H: well_formed_closed_ex_aux φ (S (S n')) = true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux ψ (S n') = true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ^[evar:n↦ψ] n = true ψ: Pattern n': nat H: well_formed_closed_ex_aux φ (S (S n')) = true H0: well_formed_closed_ex_aux ψ n' = true
?ind_evar1 ≤ S n'
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ^[evar:n↦ψ] n = true ψ: Pattern n': nat H: well_formed_closed_ex_aux φ (S (S n')) = true H0: well_formed_closed_ex_aux ψ n' = true
well_formed_closed_ex_aux ψ ?ind_evar1 = true
Σ: Signature φ: Pattern IHφ: ∀ (ψ : Pattern) (n : nat),
well_formed_closed_ex_aux φ (S n) = true
→ well_formed_closed_ex_aux ψ n = true
→ well_formed_closed_ex_aux φ^[evar:n↦ψ] n = true ψ: Pattern n': nat H: well_formed_closed_ex_aux φ (S (S n')) = true H0: well_formed_closed_ex_aux ψ n' = true
Σ: Signature x: evar n, dbi: db_index Hwf: if decide (n < dbi) then true else false
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end = patt_bound_evar n
Σ: Signature x: evar n, dbi: db_index Hwf: if decide (n < dbi) then true else false
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ => patt_bound_evar (Nat.pred n)
end = patt_bound_evar n
Σ: Signature x: evar n, dbi: db_index n0: ¬ n < dbi H: decide (n < dbi) = right n0 Hwf: false e: n = dbi H0: compare_nat n dbi = Nat_equal n dbi e
patt_free_evar x = patt_bound_evar n
Σ: Signature x: evar n, dbi: db_index n0: ¬ n < dbi H: decide (n < dbi) = right n0 Hwf: false g: n > dbi H0: compare_nat n dbi = Nat_greater n dbi g
patt_bound_evar (Nat.pred n) = patt_bound_evar n
Σ: Signature x: evar n, dbi: db_index n0: ¬ n < dbi H: decide (n < dbi) = right n0 Hwf: false g: n > dbi H0: compare_nat n dbi = Nat_greater n dbi g
(if decide (X = x)
then patt_bound_svar dbi
else patt_free_svar x)^[svar:dbi↦patt_free_svar X] =
patt_free_svar x
Σ: Signature X: svar n, dbi: db_index Hwf: if decide (n < dbi) then true else false
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = patt_bound_svar n
Σ: Signature X: svar n, dbi: db_index Hwf: if decide (n < dbi) then true else false
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_svar n
| Nat_equal _ _ _ => patt_free_svar X
| Nat_greater _ _ _ => patt_bound_svar (Nat.pred n)
end = patt_bound_svar n
Σ: Signature X: svar n, dbi: db_index n0: ¬ n < dbi H: decide (n < dbi) = right n0 Hwf: false e: n = dbi H0: compare_nat n dbi = Nat_equal n dbi e
patt_free_svar X = patt_bound_svar n
Σ: Signature X: svar n, dbi: db_index n0: ¬ n < dbi H: decide (n < dbi) = right n0 Hwf: false g: n > dbi H0: compare_nat n dbi = Nat_greater n dbi g
patt_bound_svar (Nat.pred n) = patt_bound_svar n
Σ: Signature X: svar n, dbi: db_index n0: ¬ n < dbi H: decide (n < dbi) = right n0 Hwf: false g: n > dbi H0: compare_nat n dbi = Nat_greater n dbi g
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_imp p q) = patt_imp (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex (a :: l) (patt_imp p q) =
patt_imp (bcmcloseex (a :: l) p)
(bcmcloseex (a :: l) q)
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_imp p q) = patt_imp (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex (a :: l) (patt_imp p q) =
patt_imp (bcmcloseex (a :: l) p)
(bcmcloseex (a :: l) q)
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_imp p q) = patt_imp (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex l (evar_open a.1 a.2 (patt_imp p q)) =
patt_imp (bcmcloseex l (evar_open a.1 a.2 p))
(bcmcloseex l (evar_open a.1 a.2 q))
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_imp p q) = patt_imp (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex l
(patt_imp p q)^[evar:a.1↦patt_free_evar a.2] =
patt_imp
(bcmcloseex l p^[evar:a.1↦patt_free_evar a.2])
(bcmcloseex l q^[evar:a.1↦patt_free_evar a.2])
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_imp p q) = patt_imp (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex l
(patt_imp p^[evar:a.1↦patt_free_evar a.2]
q^[evar:a.1↦patt_free_evar a.2]) =
patt_imp
(bcmcloseex l p^[evar:a.1↦patt_free_evar a.2])
(bcmcloseex l q^[evar:a.1↦patt_free_evar a.2])
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_imp p q) = patt_imp (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
patt_imp
(bcmcloseex l p^[evar:a.1↦patt_free_evar a.2])
(bcmcloseex l q^[evar:a.1↦patt_free_evar a.2]) =
patt_imp
(bcmcloseex l p^[evar:a.1↦patt_free_evar a.2])
(bcmcloseex l q^[evar:a.1↦patt_free_evar a.2])
reflexivity.}Qed.
Σ: Signature l: list (db_index * evar) p, q: Pattern
bcmcloseex l (patt_app p q) =
patt_app (bcmcloseex l p) (bcmcloseex l q)
Σ: Signature l: list (db_index * evar) p, q: Pattern
bcmcloseex l (patt_app p q) =
patt_app (bcmcloseex l p) (bcmcloseex l q)
Σ: Signature l: list (db_index * evar)
∀pq : Pattern,
bcmcloseex l (patt_app p q) =
patt_app (bcmcloseex l p) (bcmcloseex l q)
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_app p q) = patt_app (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex (a :: l) (patt_app p q) =
patt_app (bcmcloseex (a :: l) p)
(bcmcloseex (a :: l) q)
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_app p q) = patt_app (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex (a :: l) (patt_app p q) =
patt_app (bcmcloseex (a :: l) p)
(bcmcloseex (a :: l) q)
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_app p q) = patt_app (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex l (evar_open a.1 a.2 (patt_app p q)) =
patt_app (bcmcloseex l (evar_open a.1 a.2 p))
(bcmcloseex l (evar_open a.1 a.2 q))
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_app p q) = patt_app (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex l
(patt_app p q)^[evar:a.1↦patt_free_evar a.2] =
patt_app
(bcmcloseex l p^[evar:a.1↦patt_free_evar a.2])
(bcmcloseex l q^[evar:a.1↦patt_free_evar a.2])
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_app p q) = patt_app (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
bcmcloseex l
(patt_app p^[evar:a.1↦patt_free_evar a.2]
q^[evar:a.1↦patt_free_evar a.2]) =
patt_app
(bcmcloseex l p^[evar:a.1↦patt_free_evar a.2])
(bcmcloseex l q^[evar:a.1↦patt_free_evar a.2])
Σ: Signature a: (db_index * evar)%type l: list (db_index * evar) IHl: ∀pq : Pattern,
bcmcloseex l (patt_app p q) = patt_app (bcmcloseex l p) (bcmcloseex l q) p, q: Pattern
patt_app
(bcmcloseex l p^[evar:a.1↦patt_free_evar a.2])
(bcmcloseex l q^[evar:a.1↦patt_free_evar a.2]) =
patt_app
(bcmcloseex l p^[evar:a.1↦patt_free_evar a.2])
(bcmcloseex l q^[evar:a.1↦patt_free_evar a.2])
reflexivity.}Qed.
Σ: Signature l: list (db_index * evar) q: Pattern
bcmcloseex l (patt_exists q) =
patt_exists
(bcmcloseex (map (λp : nat * evar, (S p.1, p.2)) l)
q)
Σ: Signature l: list (db_index * evar) q: Pattern
bcmcloseex l (patt_exists q) =
patt_exists
(bcmcloseex (map (λp : nat * evar, (S p.1, p.2)) l)
q)
∀k : db_index,
well_formed_closed_ex_aux
ϕ^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ (S k) = true
Σ: Signature n: db_index x: evar k: db_index H: well_formed_closed_ex_aux
match compare_nat n k with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred n)
end k = true
(if decide (n < S k) then true else false) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature n: db_index x: evar k: db_index H: well_formed_closed_ex_aux
match compare_nat n k with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred n)
end k = true
(if decide (n < S k) then true else false) = true
Σ: Signature n: db_index x: evar k: db_index g: n > k H0: compare_nat n k = Nat_greater n k g H: well_formed_closed_ex_aux
(patt_bound_evar (Nat.pred n)) k = true n0: ¬ n < S k H1: decide (n < S k) = right n0
false = true
Σ: Signature n: db_index x: evar k: db_index g: n > k H0: compare_nat n k = Nat_greater n k g H: (if decide (Nat.pred n < k) then true else false) =
true n0: ¬ n < S k H1: decide (n < S k) = right n0
false = true
case_match; lia.
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H0: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true H1: well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H0: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true H1: well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
true && well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H0: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true H1: well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
true && true = true
reflexivity.
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H0: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true H1: well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H0: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true H1: well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
true && well_formed_closed_ex_aux ϕ2 (S k) = true
Σ: Signature ϕ1, ϕ2: Pattern x: evar IHϕ1: ∀k : db_index,
well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ1 (S k) = true IHϕ2: ∀k : db_index,
well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
→ well_formed_closed_ex_aux ϕ2 (S k) = true k: db_index H0: well_formed_closed_ex_aux
ϕ1^[evar:k↦patt_free_evar x] k = true H1: well_formed_closed_ex_aux
ϕ2^[evar:k↦patt_free_evar x] k = true
true && true = true
reflexivity.}Qed.
Σ: Signature dbi: nat x: evar k: nat ϕ: Pattern
k > dbi
→ well_formed_closed_ex_aux (evar_open dbi x ϕ) k
→ well_formed_closed_ex_aux ϕ (S k)
Σ: Signature dbi: nat x: evar k: nat ϕ: Pattern
k > dbi
→ well_formed_closed_ex_aux (evar_open dbi x ϕ) k
→ well_formed_closed_ex_aux ϕ (S k)
Σ: Signature dbi: nat x: evar k: nat ϕ: Pattern
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k)
Σ: Signature dbi: nat x: evar k: nat ϕ: Pattern H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ (S k)
Σ: Signature x: evar ϕ: Pattern
∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k)
Σ: Signature x: evar n: db_index k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred n)
end k
if decide (n < S k) then true else false
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k)
well_formed_closed_ex_aux ϕ (S (S k))
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ (S k)
Σ: Signature x: evar n: db_index k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred n)
end k
if decide (n < S k) then true else false
Σ: Signature x: evar n: db_index k, dbi: nat H1: k > dbi g: n > dbi H: compare_nat n dbi = Nat_greater n dbi g H2: well_formed_closed_ex_aux
(patt_bound_evar (Nat.pred n)) k n0: ¬ n < S k H0: decide (n < S k) = right n0
false
Σ: Signature x: evar n: db_index k, dbi: nat H1: k > dbi g: n > dbi H: compare_nat n dbi = Nat_greater n dbi g H2: if decide (Nat.pred n < k) then true else false n0: ¬ n < S k H0: decide (n < S k) = right n0
false
Σ: Signature x: evar n: db_index k, dbi: nat H1: k > dbi g: n > dbi H: compare_nat n dbi = Nat_greater n dbi g n1: ¬ Nat.pred n < k H3: decide (Nat.pred n < k) = right n1 H2: false n0: ¬ n < S k H0: decide (n < S k) = right n0
false
apply H2.
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k)
well_formed_closed_ex_aux ϕ (S (S k))
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
true && well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
true && true
reflexivity.
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k)
well_formed_closed_ex_aux ϕ (S (S k))
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S k) &&
well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
true && well_formed_closed_ex_aux ϕ2 (S k)
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ1 (S k) IHϕ2: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ2 (S k) k, dbi: nat H1: k > dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
true && true
reflexivity.
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k)
well_formed_closed_ex_aux ϕ (S (S k))
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ (S k)
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k)
well_formed_closed_ex_aux ϕ (S (S k))
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k)
true
reflexivity.
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ (S k)
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
well_formed_closed_ex_aux ϕ (S k)
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k > dbi
→ well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
→ well_formed_closed_ex_aux ϕ (S k) k, dbi: nat H1: k > dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k
k > dbi
lia.}Qed.
Σ: Signature dbi: nat x: evar k: nat ϕ: Pattern
k < dbi
→ well_formed_closed_ex_aux (evar_open dbi x ϕ) k =
true → well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature dbi: nat x: evar k: nat ϕ: Pattern
k < dbi
→ well_formed_closed_ex_aux (evar_open dbi x ϕ) k =
true → well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature dbi: nat x: evar k: nat ϕ: Pattern H1: k < dbi H2: well_formed_closed_ex_aux (evar_open dbi x ϕ) k =
true
well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature x: evar ϕ: Pattern
∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux (evar_open dbi x ϕ) k =
true → well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature x: evar n: db_index k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
(evar_open dbi x (patt_bound_evar n)) k = true
(if decide (n < S dbi) then true else false) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S dbi) &&
well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S dbi) &&
well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k) = true
well_formed_closed_ex_aux ϕ (S (S dbi)) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature x: evar n: db_index k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
(evar_open dbi x (patt_bound_evar n)) k = true
(if decide (n < S dbi) then true else false) = true
(if decide (n < S dbi) then true else false) = true
Σ: Signature x: evar n: db_index k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
match compare_nat n dbi with
| Nat_less _ _ _ => patt_bound_evar n
| Nat_equal _ _ _ => patt_free_evar x
| Nat_greater _ _ _ =>
patt_bound_evar (Nat.pred n)
end k = true
(if decide (n < S dbi) then true else false) = true
Σ: Signature x: evar n: db_index k, dbi: nat H1: k < dbi g: n > dbi H: compare_nat n dbi = Nat_greater n dbi g H2: well_formed_closed_ex_aux
(patt_bound_evar (Nat.pred n)) k = true n0: ¬ n < S dbi H0: decide (n < S dbi) = right n0
false = true
Σ: Signature x: evar n: db_index k, dbi: nat H1: k < dbi g: n > dbi H: compare_nat n dbi = Nat_greater n dbi g H2: (if decide (Nat.pred n < k) then true else false) =
true n0: ¬ n < S dbi H0: decide (n < S dbi) = right n0
false = true
case_match; lia.
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S dbi) &&
well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S dbi) &&
well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k) = true
well_formed_closed_ex_aux ϕ (S (S dbi)) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S dbi) &&
well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S dbi) &&
well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
true && well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
true && true = true
reflexivity.
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S dbi) &&
well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k) = true
well_formed_closed_ex_aux ϕ (S (S dbi)) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k &&
well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S dbi) &&
well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ1 (S dbi) &&
well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
true && well_formed_closed_ex_aux ϕ2 (S dbi) = true
Σ: Signature x: evar ϕ1, ϕ2: Pattern IHϕ1: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ1) k = true
→ well_formed_closed_ex_aux ϕ1 (S dbi) =
true IHϕ2: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ2) k = true
→ well_formed_closed_ex_aux ϕ2 (S dbi) =
true k, dbi: nat H1: k < dbi H: well_formed_closed_ex_aux
ϕ1^[evar:dbi↦patt_free_evar x] k = true H0: well_formed_closed_ex_aux
ϕ2^[evar:dbi↦patt_free_evar x] k = true
true && true = true
reflexivity.
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k) = true
well_formed_closed_ex_aux ϕ (S (S dbi)) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k) = true
well_formed_closed_ex_aux ϕ (S (S dbi)) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:S dbi↦patt_free_evar x]
(S k) = true
true = true
reflexivity.
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k = true
well_formed_closed_ex_aux ϕ (S dbi) = true
Σ: Signature x: evar ϕ: Pattern IHϕ: ∀kdbi : nat,
k < dbi
→ well_formed_closed_ex_aux
(evar_open dbi x ϕ) k = true
→ well_formed_closed_ex_aux ϕ (S dbi) = true k, dbi: nat H1: k < dbi H2: well_formed_closed_ex_aux
ϕ^[evar:dbi↦patt_free_evar x] k = true
k < dbi
lia.}Qed.
Σ: Signature n: db_index x, y: evar ϕ: Pattern
bevar_occur ϕ n = false
→ evar_open n y (evar_open n x ϕ) =
evar_open n x (evar_open (S n) y ϕ)
Σ: Signature n: db_index x, y: evar ϕ: Pattern
bevar_occur ϕ n = false
→ evar_open n y (evar_open n x ϕ) =
evar_open n x (evar_open (S n) y ϕ)
patt_exists
ϕ^[evar:S (S n')↦patt_free_evar y]^[evar:
S n'↦patt_free_evar x] =
patt_exists
ϕ^[evar:S (S n')↦patt_free_evar y]^[evar:
S n'↦patt_free_evar x]